Home > Archive > MS SQL Server > February 2006 > date query question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author date query question
Paul

2006-02-06, 8:23 pm

Hi I have a calendar that the user selects a date from without a time.
Anyhow I need the query to return the record even though the data in the
table contains a time.
this works but I do not have a time in the search.
select * from table where DateTime ='2003-05-09 10:00:00'
this does not work
select * from table where DateTime = '2003-05-09' but I need something
quivalent that will work.
thanks.
--
Paul G
Software engineer.
Paul

2006-02-06, 8:23 pm

found solution!
--
Paul G
Software engineer.


"Paul" wrote:

> Hi I have a calendar that the user selects a date from without a time.
> Anyhow I need the query to return the record even though the data in the
> table contains a time.
> this works but I do not have a time in the search.
> select * from table where DateTime ='2003-05-09 10:00:00'
> this does not work
> select * from table where DateTime = '2003-05-09' but I need something
> quivalent that will work.
> thanks.
> --
> Paul G
> Software engineer.

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com