Skip to main content

Using PQL in the VBFA table, I need to combine the date and time into a single timestamp.

Both the ERDAT (date) and  ERZET (time) fields are formatted as complete timestamps in our data model.

I succeeded by converting both fields to strings, combining them, then converting the combined string back to a date.

TO_DATE(TO_STRING ("VBFA"."ERDAT" , FORMAT ( '%Y-%m-%d' ) )||' '||TO_STRING("VBFA"."ERZET", format ('%H:%M:%S')), FORMAT ( '%Y-%m-%d %H:%M:%S' ) )

Is there a more direct approach I could use to obtain the same result? The conversion to string seems  unnecessary.

Thank you.

Be the first to reply!

Reply