This topic is locked
[SOLVED]

 GetDate() function

7/28/2010 4:24:03 PM
ASPRunnerPro General questions
G
goffj1 author

I have a SQL table, named Booking, with a field named START that contains the date and time in the form of "yyyy/mm/dd hh:mm:ss".
I can compare that value to the current date and time using "WHERE GETDATE() < Booking.Start" as part of the query
What I actually want is to subtract 4 minutes from GETDATE() while maintaining the date part and compare against the Booking.Start field.

A
ann 7/29/2010

Hi,
edit your query in the SQL mode on the Edit SQL query tab.

Here is just a sample:

SELECT

...

From Booking

Where DATEADD(mi,-4,GETDATE())<Start
G
goffj1 author 7/29/2010

That works - thanks