How to get the last day based on year and month

Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL
viramu54
Posts: 1
Joined: Mon Feb 12, 2018 10:25 pm
Skillset: I have 24 years of experience with JCL's,COBOL ,JAVA programmin/testing
Referer: googl

How to get the last day based on year and month

Postby viramu54 » Mon Feb 12, 2018 10:31 pm

Hello,

I am trying to get the last day of the month based on the year and month value taking leap year into consideration .

Input : 201702

output should be : 2017-02-28

input : 201602
output should be : 2016-02-29

Any help would be appreciated as I am new to syncsort ... Wondering LASTDAYM would work ?

Thanks

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: How to get the last day based on year and month

Postby NicC » Tue Feb 13, 2018 5:17 am

Wondering LASTDAYM would work

Why wonder? Why not try?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic


  • Similar Topics
    Replies
    Views
    Last post