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 TimeSpanDateIn 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?
RegardsJohannes
Hello Johannes,
Thank you for your post. I have been looking into your issue and would you please attach a sample application where it occurs ?
I would like to see your whole implementation in order to research your scenario. According to our online documentation if you are using TimeSpan type you need to convert it to MicrosotExcelDate by using the ‘TimeOfDayToExcelDate’ method :
http://help.infragistics.com/NetAdvantage/WPF/2012.2/CLR4.0/?page=InfragisticsWPF4.Calculations.XamCalculationManager.v12.2~Infragistics.Calculations.Engine.CalculationValue_members.html
Looking forward to hearing from you.
Hi Yanko,
please find enclosed a sample application demonstrating the problem I mentioned.
Thanks in advance for looking at itJohannes
I am just checking if you require any further assistance on the matter.
No, at this time I do not need further assistance. Thank you for the information.
ThanksJohannes