Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I am searching data of table by comparing a database column to my AJAX control picked date.
My problem is that the database column is taking getdate() as input.
How am I able to search it from my procedure?
How can I handle it?
Any help is really appreciated.
Posted
Updated 17-Nov-11 0:51am
v4
Comments
André Kraak 17-Nov-11 5:44am    
Edited question:
Formatted text/code
Spelling/Grammar
shek124 17-Nov-11 6:14am    
Post your code
rajeevcapgeminiindia 17-Nov-11 6:17am    
Please more clarify your question or send the code....

If your table is taking getdate() as a value to populate the table this should not be an issue, if it is using GetDate() to query the table then obviously this will be an issue.

Assuming the table has been populated with getdate() then your server side method for handling the AJAX request would be something like

Select <column> from <table> where <date column> = <date passed by ajax>


To return the correct column(s) - you will then use these columns to formulate your AJAX response.
 
Share this answer
 
v3
when you send date to procedure as a parameter
convert in before using e.g. CONVERT(varchar(10),@Date,101)

for more info about convert follow

http://www.sqlusa.com/bestpractices/datetimeconversion/

- nilesh
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900