Calculate number of days in the KReport

Hello @maretval

We want to calculate the number of days and display them in the columns of the KReport.

We have Created Date and Modified Date fields in the record, and we want to know how many days have passed since those dates until today.

How can we add these two columns?

The below worked for us :star_struck: :partying_face: :100:


DATEDIFF(NOW(), {t}.date_entered)

DATEDIFF(NOW(), {t}.date_modified)

If you have the field with date type:

DATEDIFF(NOW(), YOUR_DATE_FIELD)