![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi to all, I have a problem storing 1973/06/03 date. If I send this statement select to_date('03/06/1973','dd/mm/yyyy'); in the psql interface I obtain to_date ------------ 1973-06-02 I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandrake 9.1 and Mandrake 9.2RC1 and obtain the same result. Can anyone help me? ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings |
#3
| |||
| |||
|
|
On Wed, Sep 10, 2003 at 12:52:22PM +0200, Torello Querci wrote: Hi to all, I have a problem storing 1973/06/03 date. If I send this statement select to_date('03/06/1973','dd/mm/yyyy'); in the psql interface I obtain to_date ------------ 1973-06-02 I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandrake 9.1 and Mandrake 9.2RC1 and obtain the same result. Can anyone help me? What's happen if you try: test=# select '03/06/1973'::date; date ------------ 1973-06-03 -- Karel Zak <zakkr (AT) zf (DOT) jcu.cz http://home.zf.jcu.cz/~zakkr/ ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings |
#4
| |||
| |||
|
|
Hi to all, I have a problem storing 1973/06/03 date. If I send this statement select to_date('03/06/1973','dd/mm/yyyy'); in the psql interface I obtain to_date ------------ 1973-06-02 I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandrake 9.1 and Mandrake 9.2RC1 and obtain the same result. Can anyone help me? ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings -- |
#5
| |||
| |||
|
|
This is not a bug, but simply due to postgres date formatting. |
#6
| |||
| |||
|
|
I think this is what you wanted. select to_char('03/06/1973'::date,'dd/mm/yyyy'); you were casting the string to a date and returning a date. so it would return it in a format that your system is set to return. agencysacks=# select to_char('03/06/1973'::date,'dd/mm/yyyy'); to_char ------------ 06/03/1973 (1 row) Ted --- Karel Zak <zakkr (AT) zf (DOT) jcu.cz> wrote: On Wed, Sep 10, 2003 at 12:52:22PM +0200, Torello Querci wrote: Hi to all, I have a problem storing 1973/06/03 date. If I send this statement select to_date('03/06/1973','dd/mm/yyyy'); in the psql interface I obtain to_date ------------ 1973-06-02 I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandrake 9.1 and Mandrake 9.2RC1 and obtain the same result. Can anyone help me? What's happen if you try: test=# select '03/06/1973'::date; date ------------ 1973-06-03 -- Karel Zak <zakkr (AT) zf (DOT) jcu.cz http://home.zf.jcu.cz/~zakkr/ ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- |
#7
| |||
| |||
|
|
On Wed, Sep 10, 2003 at 12:52:22PM +0200, Torello Querci wrote: Hi to all, I have a problem storing 1973/06/03 date. If I send this statement select to_date('03/06/1973','dd/mm/yyyy'); in the psql interface I obtain to_date ------------ 1973-06-02 I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandra= ke 9.1 and Mandrake 9.2RC1 and obtain the same result. Can anyone help me? What's happen if you try: test=3D# select '03/06/1973'::date; date ------------ 1973-06-03 |
![]() |
| Thread Tools | |
| Display Modes | |
| |