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

Need clarity on dates.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thespider390

New User


Joined: 28 May 2010
Posts: 3
Location: New Delhi

PostPosted: Mon Aug 02, 2010 10:31 pm
Reply with quote

Here is my requirement:-

I need to fetch 2 time stamps from DB2 table. IN and OUT. It is done .
Now I have to calculate the difference of time. I'm able to do that easily is HH:MM:SS as far as it is the same date(daye) like in time is on 24/july/2010 at any time and OUT time is on the same day, some time later.
My problem is when In time is on 24/July/2010 and out time is after few days, let say 27/july/2010. Now I do not know how to tell my program about days.

Same problem occurs if Transaction IN is on 24/july/2010 at 11:20:30 PM and out on 25/July/2010 at 00:18:38 am. Please give me a good approach. I need HH:MM:SS or maybe Day can be included later on my project.

Thanks
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Mon Aug 02, 2010 10:59 pm
Reply with quote

DB2 is very good at calculating the difference between two timestamps!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 03, 2010 3:33 pm
Reply with quote

well something happened to the post of naziashaffi,
and I created a fun response,
but it seems someone had deleted the original post.

so, I have to edit mine.

deleted sarcasm

timestamp arithmetic,

more deleted sarcasm
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 Amount of days between two dates PL/I & Assembler 8
No new posts Dates compare on specific dates using... DFSORT/ICETOOL 2
No new posts Comparing dates in different formats SYNCSORT 4
No new posts Sort Card : To get the records with ... DFSORT/ICETOOL 7
No new posts difference between dates in months C... Testing & Performance 6
Search our Forums:

Back to Top