Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jaimin
Starting Member
21 Posts |
Posted - 2007-07-03 : 09:02:52
|
| hi i am using a calendar control. the format is mm-dd-yyyymy table stores date in the following format-mm/dd/yyyy hh:mm:ssmy search is based only on date(not time). how can i do it?thanks Jaimin |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-07-03 : 09:17:45
|
| [code]Where dateadd(day, 0, datediff(day, 0, datecol)) = dateadd(day, 0, datediff(day, 0, @datevar))[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
jaimin
Starting Member
21 Posts |
Posted - 2007-07-03 : 09:37:55
|
| hiare u searching on the base of date difference??actually, my search is based on startDate. user chooses the startDate from calendar and on button click, the result get displayed in gridview.can you tell me how should i deal with it??thanks Jaimin |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-03 : 09:40:21
|
| Where datecol >= @datevar and datecol < dateadd(day, 1, @datevar)to use present indexPeter LarssonHelsingborg, Sweden |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-07-04 : 00:49:34
|
| www.sql-server-performance.com/fk_datetime.aspMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|