rpastudent

New Member
Hi,

I have a data item with the data type TimeSpan. The value is brought from the work queue. However, I'd like to manipulate the time by adding hours to it. E.g. the timespan is: 12:00:00 and I like to add 2 hours to it where the result will be 14:00:00.

I tried to add time/hours to my data item with the 'MakeTimeSpan' function in a Calculate stage but that didn't work.
 

Pete_L

Active Member
Try using MakeTimeSpan to add 2 hours to the original value. Calculation stage: [Original Date Item] + MakeTimeSpan(0, 2, 0, 0). The parameters represent Day, Hours, Minutes, Seconds, and the result will be of type TimeSpan.
 

rpastudent

New Member
Hi, thank you for your reply @Pete_L.

Seems like I'm missing something. The [Time] data item has the data type TimeSpan.
 

Attachments

  • Capture.PNG
    17.5 KB · Views: 53

Pete_L

Active Member
Enter the expression like this: [Time] + MakeTimeSpan(0,2,0,0). I'm not at my work computer to validate this expression, but it should work if it is entered with comma (,) separators as shown.
 
Top