Getting the function code for date and time



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Getting the function code for date and time

Postby gvenkateshmca » Mon Mar 23, 2015 6:34 pm

Hi All,

I have the below requirement for the date and time calculation.

I will be getting the time from the table with minutes and need to subtract from the current time and need to convert this into the date and time.

suppose current date is 23rd march 2015 , current time 5.00 pm if input from table is 1440(60*24) minutes i have to get the previous date 22 march 2015 .
Please let me know if we have any function to handle this case.


Thanks in Advances.
Venkat
gvenkateshmca
 
Posts: 10
Joined: Mon Mar 23, 2015 6:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting the function code for date and time

 

Re: Getting the function code for date and time

Postby BillyBoyo » Mon Mar 23, 2015 7:21 pm

All the intrinsic functions (part of the language) are documented, and there are no user-written functions in Enterprise COBOL. Someone at your site will have done date/time calculations previously, so there will be working code that you can use, possible already in a sub-program, possibly you can consider making one if it is likely to be used more in the future.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post