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
 

 

Need clarity on dates.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Need clarity on dates.
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Tue Aug 03, 2010 3:33 pm    Post subject:
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    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 Sort Card : To get the records with ... pecsakthivel123 DFSORT/ICETOOL 7 Thu Dec 10, 2015 11:54 pm
No new posts difference between dates in months C... josepnass Testing & Performance analysis 6 Wed Jun 18, 2014 2:30 am
No new posts problem in difference of dates Kmr.deepakcs DFSORT/ICETOOL 8 Fri Oct 25, 2013 10:19 am
No new posts How to calculate days which is differ... mahe1015 PL/I & Assembler 6 Mon Oct 21, 2013 4:39 pm
No new posts Difference between dates in European ... expat DFSORT/ICETOOL 5 Tue Mar 19, 2013 8:27 pm


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