Hi,
I need to calculate the end date and time from 2 input values, like so:
End Date = [Start Date] + [Days]
Where Start Date is DateTime type, and Days is a Number type. That works just fine, so if experiment starts on 5/5/2019 03:00 AM and is expected to go for 1 days, then the End Date will be calculated properly as 5/6/2019 03:00 AM.
However, occasionally the experiment is scheduled to run for half a day (formatted as 0.5 in the source table). The Number type wonโt let me enter decimals, so I switch it to type Decimal. My hope was that the result would be 05/05/2019 03:00 PM, but instead I get an error on the End Date calculation.
I think what I need is to take Days and convert it to a Duration type in hours before adding it to Start Date. Is that right? If so, Iโm stuck on how to make that conversion.
My Start Date and Days columns are copied in bulk from an outside scheduler, so I donโt control how they are brought into the table.
Thanks,
TJ
Solved! Go to Solution.
Ok, well. I slogged it out, with a little nudge from an older post and a mishap or two along the way. Fairly straightforward, once I understood the structure of the duration type.
Virtual Column
Duration
Concatenate([Days]*24,":00:00")
End Date
[Start Date] + [Duration]
Ok, well. I slogged it out, with a little nudge from an older post and a mishap or two along the way. Fairly straightforward, once I understood the structure of the duration type.
Virtual Column
Duration
Concatenate([Days]*24,":00:00")
End Date
[Start Date] + [Duration]
User | Count |
---|---|
33 | |
30 | |
30 | |
19 | |
16 |