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
Hi Yanko,
No, at this time I do not need further assistance. Thank you for the information.
ThanksJohannes
Hello Johannes,
I am just checking if you require any further assistance on the matter.
Thank you for your feedback. It seems that the ‘DateAndTime’ functions support only DateTime parameters.
After some research I have submit a product idea for Timespan support for these functions. . I have sent your product idea directly to our product management team. Our product team chooses new product ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this product idea is PI13020098.
If you would like to follow up on your product idea at a later point, you may contact Developer Support management via email. Please include the reference number of your product idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.
please find enclosed a sample application demonstrating the problem I mentioned.
Thanks in advance for looking at itJohannes
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.