Skip to main content
Question

What does "{d '1970-01-02' } " refer to? What is returned as O/P in the PQL statement - REMAP_TIMESTAMPS ( {d '1970-01-02' } , DAYS ) ?

  • August 4, 2023
  • 4 replies
  • 9 views

4 replies

Hello @abhinav.singa11 ,

 

REMAP_TIMESTAMPS ( {d '1970-01-02' } , DAYS ) calculates the number of days since 1970-01-01.

The above statement will give the output as 1, because number of days since 1970-01-01 is 1.

image 

If we change it to let's say REMAP_TIMESTAMPS ( {d '1970-01-10' } , DAYS ), then this should return "9" as number of days between 1970-01-01 and 1970-01-10 is 9.

 

image


Hallo @sayali.khiri ,

 

Thank you for the explanation.

 

But when you see in Scenario 3, 4, 5, 6 example on the page - REMAP_TIMESTAMPS (celonis.com). They did not mention the 'd' in the statment - REMAP_TIMESTAMPS ( "activity"."time" , SECONDS , FACTORY_CALENDAR ( "calendar"."start" , "calendar"."end" ) ) (see below pic). Does the system recognize automatically and considers default? If yes, why does the system not recognize automatically, instead we mention 'd'?

 

Thanks in advance.

 

image 

 

 


abhishek.chatu14
Level 11
Forum|alt.badge.img+4

Hallo @sayali.khiri ,

 

Thank you for the explanation.

 

But when you see in Scenario 3, 4, 5, 6 example on the page - REMAP_TIMESTAMPS (celonis.com). They did not mention the 'd' in the statment - REMAP_TIMESTAMPS ( "activity"."time" , SECONDS , FACTORY_CALENDAR ( "calendar"."start" , "calendar"."end" ) ) (see below pic). Does the system recognize automatically and considers default? If yes, why does the system not recognize automatically, instead we mention 'd'?

 

Thanks in advance.

 

image 

 

 

Hi Abhinav,

 

Since the value given in the first case is hardcoded and a string you need to specify that the following is a date, while in the second case you are expected to use a date column for the calculation.

 

So when we break down the components:

  • d: This is a specifier indicating that the following value is a date.
  • '1970-01-02': This is the actual date value specified in the format 'YYYY-MM-DD'. In this case, it represents January 2, 1970.

Hi Abhinav,

 

Since the value given in the first case is hardcoded and a string you need to specify that the following is a date, while in the second case you are expected to use a date column for the calculation.

 

So when we break down the components:

  • d: This is a specifier indicating that the following value is a date.
  • '1970-01-02': This is the actual date value specified in the format 'YYYY-MM-DD'. In this case, it represents January 2, 1970.

Hi Abhishek,

 

thank you for the clarification.