I need to take the current date and get a range between the current date and back 1 hour or 60 minutes using SQL and an SQL Database.
Does someone have some sample code to show me please?
Printable View
I need to take the current date and get a range between the current date and back 1 hour or 60 minutes using SQL and an SQL Database.
Does someone have some sample code to show me please?
How about:
DateAdd("h", -1, Now)
and then you take the value returned back from DateAdd and use it in your query:
Select Bla from That where some_date between ThisDate and ThatDate
or
Select Bla from That where some_date >= ThisDate and some_date <= ThatDate