Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
XamCalculationManager: TimeSpan in forumla
posted

Hello,

The following formula does not calculate with the following error: "Invalid numeric values in the function or formula." 

DATEDIFF("n", DATEADD("n", 60 * HOUR([TimeIn]) + MINUTE([TimeIn]), [DateIn]), DATEADD("n", 60 * HOUR([TimeOut]) + MINUTE([TimeOut] ), [DateOut]))

TimeIn and TimeOut are of type TimeSpan
DateIn and DateOut  are of type DateTime

It does however work if TimeIn and TimeOut is of type DateTime. I tried adding a custom function, but as far as I can see you can only add functions that deal with doubles.

How do I add a TimeSpan to a DateTime using formulas?

Regards
Johannes