|Title: Get the week number of the year for a date|
One way to get the week number of a passed date is to use intrinsic functions.
iscc week-of-year.cbl iscrun WEEK_OF_YEARYour output will look like this for Christmas day, 2023:
For date 20231225, The julian value is 2023359, and that date is in week # 52 of the year.Other examples of using intrinsic functions to manipulate dates can be found in the sample programs installed in $ISCOBOL/sample/is-java/iscobol-uses-cobol-object/IS_DATE.
These programs validate a date, calculate the number of days between two dates, and return the day of the week.
Another way to work with dates is to use Java classes and OOP COBOL.
You can see an examples of this in KB article #119 here and in the sample program referenced above.
|Authored by: Veryant Support on Fri, Feb 17th, 2023 at 7:00 PM
This question has been viewed 342 times so far.
|Online URL: http://support.veryant.com/support/phpkb/question.php?ID=336|
Powered by PHPKB Knowledge Base Software