Converting DateFormula to DateTime

449 views Asked by At

In business central there is this data type named DateFormula, in it you can define things like '1D + 2H + 3S' (1 day, 2 hours and 3 seconds). I found out that i can convert this time range to a Date using CalcDate() however, Date objects dont contain the time information, which I do need.

There is no CalcDateTime() function in BC, nor does it mention converting DateFormula's to DateTime anywhere online it seems.

How can I convert a DateFormula to a DateTime object in BC?

1

There are 1 answers

0
Luke_ On BEST ANSWER

OK so apparently it turns out that DateFormula datatype does not even support things like hours and seconds, only dates and no times.

Solved!