Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us