Skip to main content
Question

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

  • Sep 9, 2022 6:49 PM UTC
  • 3 replies
  • 174 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
  • Sep 10, 2022 7:27 AM UTC

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
  • Nov 11, 2022 11:13 AM UTC

Getting syntax error

Output

Execution error: Incorrect syntax near '20220910092700'.


  • Level 9
  • Feb 15, 2023 10:29 AM UTC

Hey Anad,

 

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

Synthax and output