Need a special offer?Find out if your project fits.
+

Calculated fields with Dates

Answered
shawn.cady@ledgerset.com asked on September 5, 2022

Hello.  I have a field in a report that contains a date/time.  I want to add a calculated field, based on that field.  The formula should be something like: 
CalculatedResult = ToDays((DateColumn.Value - Now()))
in my own pseudo-code.  Basically, I want to calculate how many days have passed since my data's date and display it as an integer in a calculated field.  Note, that I want to do this in the report customization through the UI.  
Thanks.
Shawn

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 6, 2022

Hello, Shawn,

Thank you for contacting us.

The described result can be achieved through the code. To calculate how many days have passed since the date from the dataset, we suggest the approach illustrated in the following JSFiddle: https://jsfiddle.net/flexmonster/5osxb01c/ 
You can create the custom Calculated Value Editor for your users to make calculations with the dates using the approach from the example above.

Please let us know if it works for you. Feel free to contact us if other questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer