Thread: date problem and set style european
I instaled a postgresql 7.2 on win2000. Problem: 1) when select a date the result is gedis30=# SELECT CURRENT_TIMESTAMP AS today; today ------------------------------- 2002-07-08 12:31:31.500692+00 2) I set a 'European' DATESTYLE but the result is gedis30=# SET DATESTYLE to 'European'; SET VARIABLE gedis30=# SELECT CURRENT_TIMESTAMP AS today; today ------------------------------- 2002-07-08 12:37:09.150259+00 (1 row) Help me for this problem Bye !! Frank Lupo (Wolf) !! -- Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f Sponsor: Lettori Dvd, stereo hi - fi e lettori cd gratis solo su qx service. Clicca e scoprirai che la tua estate in musica te la regaliamo noi. Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=541&d=8-7
On Mon, 2002-07-08 at 13:29, frank_lupo wrote: > 2) I set a 'European' DATESTYLE but the result is > gedis30=# SET DATESTYLE to 'European'; > SET VARIABLE > gedis30=# SELECT CURRENT_TIMESTAMP AS today; > today > ------------------------------- > 2002-07-08 12:37:09.150259+00 > (1 row) > > Help me for this problem bray=# set datestyle to 'SQL,European'; SET VARIABLE bray=# SELECT CURRENT_TIMESTAMP AS today; today -------------------------------- 08/07/2002 15:52:06.774377 BST (1 row) bray=# set datestyle to 'Postgres,European'; SET VARIABLE bray=# SELECT CURRENT_TIMESTAMP AS today; today ------------------------------------- Mon 08 Jul 15:52:31.031277 2002 BST (1 row) bray=# set datestyle to 'iso'; SET VARIABLE bray=# SELECT CURRENT_TIMESTAMP AS today; today ------------------------------- 2002-07-08 15:54:06.472742+01 (1 row)
... > 2) I set a 'European' DATESTYLE but the result is > gedis30=# SET DATESTYLE to 'European'; > Help me for this problem You need to set some date style other than "ISO" (which is the default). Setting "European" affects output date ordering for those styles where it would be noticable, and affects the interpretation of input dates, but does not directly determine the style of the output. Try SET DATESTYLE = "Postgres,European"; or SET DATESTYLE = "SQL,European"; for examples which may match what you want. - Thomas