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 Logic to skip Maximum time-stamp and ... vickey_dw DB2 2 Thu Feb 01, 2018 11:15 pm
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

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