Skip to main content
Question

How to convert string(format YYYYMMDDHHMMSS) into the timestamp(date) value using either SQL or PQL?

  • September 9, 2022
  • 3 replies
  • 54 views

deepak.kumar30
Level 3
How to convert string(format YYYYMMDDHHMMSS) into the timestamp(date) value using either SQL or PQL?

3 replies

  • Level 9
  • September 10, 2022

Hey Deepak,

 

In Celonis you can use the TO_DATE function (https://docs.celonis.com/en/to_date.html).

For the current time this would result in:

TO_DATE ( '20220910092700', FORMAT ( '%Y%m%d%H%M%S' ) )

This should work.

 

Maurits


  • Level 4
  • November 11, 2022

Getting syntax error

Output

Execution error: Incorrect syntax near '20220910092700'.


  • Level 9
  • February 15, 2023

Hey Anad,

 

Above synthax works in the cloud environment. Could you provide the full formula you are using?

Synthax and output