When I had to do date calculations in REXX, I used the information here http://www.rexxla.org/rexxlang/mfc/datec.html DATE('B') returns todays date as a number of days from a date in the past. Subtract 1 from that and you get yesterday. You can then use different formats of the DATE function to convert our result to a human readable format.
Gadi -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of saurabh khandelwal Sent: Thursday, August 2, 2018 11:39 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: how to calculate previous day using REXX Hello Group, In REXX , we have Date function to calculate today's date but do we have any separate function to calculate yesterday's date. currently, we used TODAY= DATE('S') YESTERDAY = TODAY - 1 this code work whole month but, starting of the month where we have date ex : TODAY - '20180801' then yesterday will be calculated like TODAY -1 , So yesterday value will be YESTERDAY = '20180800' , which is wrong. Can you please help to overcome this issue. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN . הודעה זו נשלחה אליך מטעם חברה בקבוצת מלם תים וייתכן שהיא מוגנת תחת סודיות מסחרית. כל הצעה, התחייבות או מצג מטעם החברה, מחייבים מסמך נפרד וחתום על ידי מורשה החתימה של החברה. החברה רשאית לנטר כל תכתובת העוברת בשרתיה והיא לא תישא באחריות לכל נזק, ו/או אובדן, שיבוש או פגיעה במידע כלשהו שנגרם מסיבות של תקיפה חיצונית ו/או זדונית על הארגון. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN