Hello Gurus,

I have a table that holds one date field and one time field.
The formats are 2011-12-01 and the time field format is 22:55:01

I want to compare a string "2011-12-01 22:58:00" to the date and time field
of the table, without having to take the string apart.

SELECT * FROM usrteams where '2011-12-01 22:58:00' <= games.gamedate + games.cutofftime

This above does not seem to look right... any suggestions ?

Thanks in advance.
Peter

You are comparing with two fields in the database with concatenation.
You should compare each field alone

SELECT * FROM usrteams where '2011-12-01' <= games.gamedate and  '22:58:00'  <= games.cutofftime

thanks .. works great ..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.