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

Need to add time in timestamp


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajeevdas03
Warnings : 1

New User


Joined: 21 Jan 2006
Posts: 19
Location: Mumbai

PostPosted: Tue Oct 20, 2015 8:49 am
Reply with quote

Hi friends,

How to add time in timestamp.
ex:
cm no shop no timestamp
123456 abcd 12/4/2014 07:34:23

I want to add 1500( 15 hrs time to timestamp).

please let me know how to do this, Appriciate your help in this.

Regards,
Raj
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Oct 20, 2015 11:43 am
Reply with quote

There's an ADD function, and if you go over 24 hours, so you have to adjust the date, there's and ADDDAYS function for the date part.
Back to top
View user's profile Send private message
rajeevdas03
Warnings : 1

New User


Joined: 21 Jan 2006
Posts: 19
Location: Mumbai

PostPosted: Tue Oct 20, 2015 11:18 pm
Reply with quote

Thanks,

can you please give me syntax for this, how to add this to get desired output
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 20, 2015 11:41 pm
Reply with quote

where are you facing problems ,
the logic or the control statements ?
Back to top
View user's profile Send private message
rajeevdas03
Warnings : 1

New User


Joined: 21 Jan 2006
Posts: 19
Location: Mumbai

PostPosted: Wed Oct 21, 2015 10:41 pm
Reply with quote

Thanks Enrico,

Actually I need to add time in timestamp for different counties,

like india, Aus, Uk

ex:

time stamp is 2015-07-1218.13.00.000000 and I need to add 1230 time into this timestamp, this 1230 time is indian time differnce which is ahead of US time.

I am not sure how to do this using Sort or if this possible or not also not sure about syntax and statement,

Please help me to get desired result.

Regards,
Raj
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Wed Oct 21, 2015 11:34 pm
Reply with quote

Raj, You could have got it by yourself it you would have spend time doing research.
Anyway's, here is what I have found for you. think how to modify this to fit to your reuqirement.

ibmmainframes.com/viewtopic.php?t=45058&postdays=0&postorder=asc&start=0
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 22, 2015 4:55 am
Reply with quote

I thought I'd said this already. You add your value to the time. If the time therefore goes over 23, you adjust, and add one to the day, using the built-in function.

That's it. Nothing else from what you have stated. Except you want different values, which you didn't mention originally. And half-hours. Which is 30 minutes. And multiple timezones, which could require subtraction (you haven't said).

So how will you know which value to add (or subtract) from the hours?

Can you just use an offset (+05.5). That's very common.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top