Skip to main content
Question

Is it possible to calculate the time taken between an activity and today's date?

  • October 24, 2023
  • 2 replies
  • 35 views

Is it possible to calculate the time taken between an activity and today's date?

2 replies

andré.tafur
Level 8
Forum|alt.badge.img+15
  • Level 8
  • October 24, 2023

Hi Jack,

 

Yes, you could use the DATEDIFF and TODAY functions with the timestamp of your activity table.

The PQL will be something like this:

 

DATEDIFF (dd, ACTIVITY_TABLE.EVENTTIME, TODAY()) ----This will give you the time in days between your activity and today's date

 

Here is some additional information about this functions:

 

DATEDIFF: https://docs.celonis.com/en/datediff.html#UUID-c5dab9a3-1b0d-e39b-021c-79857e628555

TODAY: https://docs.celonis.com/en/today.html#UUID-9dd7e754-0f18-5285-d4d2-42f99299bdd8

 

Hope this helps.


and if I need to calculate with the end of the month date?