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.