Hi,
I have a query from the mainframe to input a from & to date in the following format: YYYYMMDD.
The top of the screen shows the current date 10/17/2006.
The default field (15,43,8) value is 20061001, where the first 4 characters equals the current year, characters 5 & 6 equals the current month, 7 & 8 characters equals 01.
Generally, I would need to change the 7 & 8 to yesterday's date. If it was the beginning of the month, then I would also change the 5 & 6 character to match the previous month.
The from & to dates will always be equal. And I will only run this query daily on Tuesday thru Friday only.
I have no problem grabbing the current dates. But how can I grab the previous date & month (if needed)?
thanks for your thoughts on this
zach
I have a query from the mainframe to input a from & to date in the following format: YYYYMMDD.
The top of the screen shows the current date 10/17/2006.
The default field (15,43,8) value is 20061001, where the first 4 characters equals the current year, characters 5 & 6 equals the current month, 7 & 8 characters equals 01.
Generally, I would need to change the 7 & 8 to yesterday's date. If it was the beginning of the month, then I would also change the 5 & 6 character to match the previous month.
The from & to dates will always be equal. And I will only run this query daily on Tuesday thru Friday only.
I have no problem grabbing the current dates. But how can I grab the previous date & month (if needed)?
thanks for your thoughts on this
zach