Forums

This topic is locked

selecting last months data

Posted 18 May 2007 13:38:17
1
has voted
18 May 2007 13:38:17 o r posted:
Hi,

I want to write a query which will run on the 1st and 17th of every month. When it runs on the 1st of the current month, the data from the 17th to the end of the last month is required. ie, beginning date is 17th of the last month and end date is the last date of the last month. Similary , when the query runs on the 17th of the current month, I need the data between the 1st of the current month and the 16th of the current month. ie, beginning date should be 1st of the current month and end date should be 16th of the current month. Can anyone help on this.

Thanks,

Reply to this topic