Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a table in SQL Server 7.0 wi

Status
Not open for further replies.

tlaksh

Programmer
Joined
Feb 25, 2001
Messages
98
Location
US
I have a table in SQL Server 7.0 with a datetime field. I need to compare this field with todays date ...getdate() and if equal ....select records from the table.

How do i get rid of the time portion or else it checks for complete match for today's date and time and retrives no records.

What date function can i use??

Thanks for all the help in advance

Laksh
 

Here is one posssibility.

Select * From Table
Where convert(char(11), DateCol) = convert(char(11), getdate())
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top