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:)
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER