Classification: Public say date('S', date('B') - 1 ,'B') Andy Styles z/Series System Programmer
-----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of ITschak Mugzach Sent: 02 August 2018 09:44 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: how to calculate previous day using REXX -- This email has reached the Bank via an external source -- Try this logic: - Get the Julian date of today (YYXXX) - Deduct 1 from Julian date (xxx) - Last 3 digits zero? (xxx) - Deduct one from first two chars (year) (YY) - Decide the Julian date (365 or 366 based on year/4) (xxx) ITschak On Thu, Aug 2, 2018 at 10:38 AM saurabh khandelwal < sourabhkhandelwal...@gmail.com> wrote: > 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 > -- ITschak Mugzach *|** IronSphere Platform* *|* *Information Security Contiguous Monitoring for Legacy **| * ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC95000. Telephone: 0131 225 4555. Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone 0207626 1500. Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC327000. Telephone: 03457 801 801. Lloyds Bank Corporate Markets plc. Registered office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 10399850. Lloyds Bank plc, Bank of Scotland plc and Lloyds Bank Corporate Markets plc are authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority. Halifax is a division of Bank of Scotland plc. HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC218813. This e-mail (including any attachments) is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it (including any attachments) immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments. Telephone calls may be monitored or recorded. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN