I am mostly self taught using the AS400 Query, we are in version V05R03M00 IBM AS400. I am trying to build a query, and need to select records using Service Date(SRVDT) of eight days ago from today to yesterday. (will run on Thursday morning for last Thursday 12:00am to yesterday, Wednesday 11:59pm. I need to set this in Select Records so that the query can be run with no prompting for date changes. I am having a very hard time trying to figure out how to set up the result field for this calculation. I have been using
TODAY CURRENT(DATE)
TODAYISO CHAR(TODAY,ISO)
LASTWEEK DAYS(TODAYISO) - 8
and the result I am getting for the LASTWEEK field is:
73-29-65. Can someone help me, not sure what I'm doing wrong and can't find any documentation on this that will help me, or that I understand. Thanks in advance for your help!!!
TODAY CURRENT(DATE)
TODAYISO CHAR(TODAY,ISO)
LASTWEEK DAYS(TODAYISO) - 8
and the result I am getting for the LASTWEEK field is:
73-29-65. Can someone help me, not sure what I'm doing wrong and can't find any documentation on this that will help me, or that I understand. Thanks in advance for your help!!!