Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
logic to find difference between to timestamps.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Sat Dec 29, 2007 11:51 pm    Post subject: logic to find difference between to timestamps.
Reply with quote

hi ,
can any one help me out with logic to find difference between to timestamps including Nsec,
i have logic to find it in days: hours :minutes :seconds :nsec

i need logic to convert this days into months and years too
ex: TS1=2007-12-25-21.45.23.453434
TS2=2006-10-01-20.21.59.999766

TO FIND: DIFF = TS2 -TS1 IN years,months,days,hh,mn,ss,nsec

note: please consider months criteria i.e jan 31 days , feb 28.....
and leap years to

regards,
Jaspal singh virk
+919833814470
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sun Dec 30, 2007 12:24 am    Post subject: Re: logic to find difference between to timestamps.
Reply with quote

jaspal wrote:

i need logic to convert this days into months and years too
ex: TS1=2007-12-25-21.45.23.453434
TS2=2006-10-01-20.21.59.999766


Days difference is meaningful but converting that to months and years is not meaningful. This assignment has been covered in the past have you tried doing a search?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing the period or dot from the v... gopinak COBOL Programming 6 Wed May 09, 2018 1:53 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts Logic to skip Maximum time-stamp and ... vickey_dw DB2 2 Thu Feb 01, 2018 11:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us