Sample Header Ad - 728x90

How does CONCAT format date fields?

0 votes
1 answer
1047 views
I have the following code : start transaction; show datestyle; set datestyle to DMY; show datestyle; select concat(timestamp_field, '') from my_table ; commit; It outputs this : DateStyle ----------- ISO, DMY (1 ligne) DateStyle (after set datestyle to DMY;) ----------- ISO, DMY (1 ligne) select concat(timestamp_field, '') from my_table ; concat --------------------- 2004-09-01 00:00:00 (1 lignes) My datestyle change doesn't seem to be accepted. Moreover, concat keeps using ISO to format my timestamp_field. I would expect something like this : concat --------------------- 01/09/2004 00:00:00 (1 lignes) >*NOTA:* I don't want to use to_char function here. I want to understand how concat automagically converts a timestamp/date field.
Asked by Stephan (1513 rep)
Jun 24, 2021, 07:52 AM
Last activity: Jun 28, 2021, 03:47 AM