hello team, i want to find how many days between invoice date and clear date in olap table. i just do "clear date" - "invoice date" but the result is weird very big numbers like millions. i just want normal days count. what is wrong with my code please help me
Solved
how to calculate days between two dates? my pql getting wrong number
Best answer by gagan1
hey
when u just subtract two dates with a minus sign celonis calculates the difference in milliseconds. thats why ur getting those massive numbers.
you just need to use the native function for this. try replacing your code with this:
DAYS_BETWEEN("Table"."Invoice Date", "Table"."Clear Date")
just make sure u put your actual table names in there. that will give u the exact day count.
take care
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.