Skip to main content
Solved

What to use for concatenating date and time using PQL?

  • Jun 12, 2023 4:02 PM UTC
  • 1 reply
  • 112 views

salma.zeped
Level 8
Forum|alt.badge.img+2

I would like to concatenate a date and time coming from a specific table into a single column, but I get the following message:

Error messageOperator requirements are not met. Operator 'CONCAT' is not compatible with inputs of type DATE.

 

Is there some workaround to concatenate DATE type?

Best answer by salma.zeped

Found the solution after more investigation. I'd like to share, in case someone finds it useful:

TO_STRING("AUFK"."ERDAT" , FORMAT ( '%Y-%m-%d')) || ' ' || TO_STRING("AUFK"."ERFZEIT", FORMAT ( '%H:%M:%S' ))

 

I simply needed to convert the data type from date to string and set the format that I required.

image

View original

1 reply

salma.zeped
Level 8
Forum|alt.badge.img+2
  • Author
  • Level 8
  • Answer
  • Jun 12, 2023 4:04 PM UTC

Found the solution after more investigation. I'd like to share, in case someone finds it useful:

TO_STRING("AUFK"."ERDAT" , FORMAT ( '%Y-%m-%d')) || ' ' || TO_STRING("AUFK"."ERFZEIT", FORMAT ( '%H:%M:%S' ))

 

I simply needed to convert the data type from date to string and set the format that I required.

image