Hi Friends,
I want to add/substract one day from a giveg Timestamp in PX. Can you please give some solution/suggestions how to achive this?
Thanks in Advance.
Regards,
Mattu
How to add one day to a Timestamp in PX
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Using Julian date
You can use this
StringToTimestamp(DateFromJulianDay((JulianDayFromDate(Left(DSLink3.timstm, 10))+1)):Right(DSLink3.timstm,9))
where DSLink3.timstm is the input timestamp.
StringToTimestamp(DateFromJulianDay((JulianDayFromDate(Left(DSLink3.timstm, 10))+1)):Right(DSLink3.timstm,9))
where DSLink3.timstm is the input timestamp.
Arnab
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Only if the source timestamp is a string. What if it's really a timestamp? The OP was unclear on this point, which is why my solution was couched in general terms.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.