Navigation:  SQL Syntax >

 

EDL Product Supporthome

Date Query

Previous pageReturn to chapter overviewNext page

Date Range Query for the last 7 days

 

MySQL

 

select * from Transactions

 where thTransdate between curdate() - 7 and curdate()

 

MSSQL

 

select * from Transactions

 where thTransdate = GetDate()- 7 AND GetDate()