Skip to main content
Question

Difference / number of days between 2 dates

  • February 11, 2020
  • 4 replies
  • 21 views

Hi all, I would like to know the day between 2 dates but using the PQL DAYS_BETWEEN it is not working. I need to know how many day passed between a creation of anagrafic vendor (LFA1.ERDAT) and creation PO (EKKO.AEDAT), an between creation of anagrafic vendor (LFA1.ERDAT) and invoice (RBKP.CPUDT). Thank you Laura

4 replies

  • Author
  • Level 5
  • February 19, 2020
Please someone can help me ? I juste need to do date1 - date2 but I do not find the right formulas on PQL. Thanks Laura

Forum|alt.badge.img+2
Hi Laura, you can get the number of days between two dates with DAYS_BETWEEN. What does not work for you here? Do you get an error message? Or do you get a wrong result? How does the exact query that you tried look like? Best David

  • Level 5
  • February 20, 2020
Hi, I guess your columns are not in DATE format,if so, you can use TO_TIMESTAMP(Table.StringColumn, YYYYMMDD ) to convert into DATE format or another reason could be No or N-N relationship within object. BR, Amogh

  • Author
  • Level 5
  • February 24, 2020
Hi Amogh, My field are DATE and Celonis recognizes them as such. My dates are in a first time :
  • LFA1.ERDAT
  • EKKO.AEDAT
and in a second time :
  • RBKP.CPUDT
  • LFA1.ERDAT