Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving Records by Date alone(time excluded)
Message
From
10/08/1999 10:54:57
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
10/08/1999 09:21:24
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00251925
Message ID:
00251978
Views:
8
>Hi! I'm having trouble in querying my tables. I have the ff. syntax:
>
>Select * from mytable where mydatecolumn='08/10/1999'
>
>It returns no rows though the table is not empty. How do I fix this so that I get all the records regardless of what time during the day they were saved. Thanks for all the help!
>
>Carlos

It's been a while, but try

SELECT * from mytable where CONVERT( C(10),mydatecolumn,101)='08/10/1999'

this gives date in mm/dd/yyyy format
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform