Link to home
Start Free TrialLog in
Avatar of ba272
ba272

asked on

Need the SQL to compare dates with no times

Hi,

I need to compare a date the time is null in the database.

sql += "WHERE Return_Time > {ts '2006-03-18 00:00:00'}";

I need to compare the date in an SQL query with a date column which has zeroes for the time.  But when I use that format in the string I get an SQL exception error.

Has anyone got an idea how to use correct SQL syntax to do this?  I only want to check the date, obviously, since the time is null anyway.

Thanks,
Bob

PS your expediency would be appreciated since I am debugging on the client's computer:)
ASKER CERTIFIED SOLUTION
Avatar of VovinE
VovinE

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ba272
ba272

ASKER

thanks.