cancel
Showing results for 
Search instead for 
Did you mean: 

DateTime with addition of time

SeetuGupta
Level 2
I have a date time field . I need to add x hour to that , say 2 hours . How can I achieve the same ?

------------------------------
Seetu Gupta
------------------------------
1 BEST ANSWER

Best Answers

EVIPUTI
MVP
[DateTime Data Item] + MakeTimeSpan(0,x,0,0). 

------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------

View answer in original post

2 REPLIES 2

EVIPUTI
MVP
[DateTime Data Item] + MakeTimeSpan(0,x,0,0). 

------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------

To follow up on Vipul solution, in newer version of Blue Prism it would be
[DateTime Data Item] + MakeTimeSpan(0;x;0;0)

Another approach can be, if you need to add hours based on localtime is doing:

Localtime() - UTCTime() and use the MakeTimeSpan that would generate as your second input.


------------------------------
Johan Sörman
RPA Developer
Telia Company
Sweden
------------------------------