Skip to main content
Solved

What to use for concatenating date and time using PQL?

  • June 12, 2023
  • 1 reply
  • 16 views

salma.zeped
Level 7
Forum|alt.badge.img

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

1 reply

salma.zeped
Level 7
Forum|alt.badge.img
  • Author
  • Level 7
  • 16 replies
  • Answer
  • June 12, 2023

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