Add Number to DateTime

I'm trying to add a minutes as a Number to DateTime.

On the app the result shows the same as the Start Time.

Simon1_2-1644231595718.png

When I test the expression the expression result shows the same as the start time, but the column for the result, Target End Time is calculating the correct DateTime with the added minutes

Calculation

[Start Date & Time]+([Target Time Make (mins)]/1440)

Simon1_1-1644231492562.png

Thanks

 

Solved Solved
0 17 1,009
1 ACCEPTED SOLUTION

TeeSee1_0-1644238456641.png

Hi 

This may not be exactly what you are looking for but I did some experiment because the documentation was not very clear to me and I was also curious how time calculations worked.

Apparently when you add an integer to a DateTime value, it is taken as the number of Days. So if you divide you Mins column by 1440, it is less than one day.

If you want to add minutes to a DateTime you have to add a Duration.

I tried to construct a Duration by concatenating strings "000:" & [Mins] & ":00" but this did not work.

So as an interim step, I created a VC with the above expression of type Duration and added this VC to my start col.

This seems to work very good.

You may want to do your own experimentation.

TeeSee1_1-1644238892749.png

 

View solution in original post

17 REPLIES 17