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

How can i add 24 hours to current timestamp in db2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Wed Oct 10, 2012 4:25 pm
Reply with quote

Hi,

I need to add 24 hrs to my current timestamp and place it in a working storage variable.

I tried the below one, but its not working. Could you please help me on this.

Exec sql
Set :ws-timestamp = current timestamp + time(24,0,0)
End-exec
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Oct 10, 2012 5:13 pm
Reply with quote

Code:
CURRENT TIMESTAMP + 24 HOURS
or
CURRENT TIMESTAMP + 1 DAY
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Oct 18, 2012 12:05 pm
Reply with quote

www.ibm.com/developerworks/data/library/techarticle/0211yip/0211yip3.html
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 -> DB2

 


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 Changeman - how can we know the curr... Compuware & Other Tools 2
No new posts Fetch data from programs execute (dat... DB2 3
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top