IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

logic to find difference between to timestamps.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
Search our Forums:

Back to Top