View previous topic :: View next topic
|
Author |
Message |
rajeevdas03 Warnings : 1 New User
Joined: 21 Jan 2006 Posts: 19 Location: Mumbai
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
rajeevdas03 Warnings : 1 New User
Joined: 21 Jan 2006 Posts: 19 Location: Mumbai
|
|
|
|
Thanks,
can you please give me syntax for this, how to add this to get desired output |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
where are you facing problems ,
the logic or the control statements ? |
|
Back to top |
|
|
rajeevdas03 Warnings : 1 New User
Joined: 21 Jan 2006 Posts: 19 Location: Mumbai
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|