From: | Marat Khairullin <xmm(at)rambler(dot)ru> |
---|---|
To: | postgres-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Error in date_trunc function? |
Date: | 2001-10-31 15:17:28 |
Message-ID: | 20011031181728.540f6cf3.xmm@rambler.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Compare TZ part of date_func function output with param 'month' and other.
Is it error?
netquote=> select date_trunc('century', now());
date_trunc
------------------------
2000-01-01 00:00:00+03
(1 row)
netquote=> select date_trunc('year', now());
date_trunc
------------------------
2001-01-01 00:00:00+03
(1 row)
netquote=> select date_trunc('month', now());
date_trunc
------------------------
2001-10-01 00:00:00+04
(1 row)
netquote=> select date_trunc('day', now());
date_trunc
------------------------
2001-10-31 00:00:00+03
(1 row)
netquote=> select date_trunc('hour', now());
date_trunc
------------------------
2001-10-31 18:00:00+03
(1 row)
netquote=> select date_trunc('minute', now());
date_trunc
------------------------
2001-10-31 18:12:00+03
(1 row)
netquote=> select date_trunc('second', now());
date_trunc
------------------------
2001-10-31 18:12:24+03
(1 row)
--
Marat Khairullin 8-> mailto:xmm(at)rambler(dot)ru
Marat(dot)Khairullin(at)f92(dot)n5049(dot)z2(dot)fidonet(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Raise Exception | 2001-10-31 15:52:14 | Best way to store/search phone numbers? |
Previous Message | wsheldah | 2001-10-31 15:16:32 | alter table workaround |