am 25.07.2006, um 12:54:35 -0400 mailte Chris Hoover folgendes:
> I have several columns in my database that are timestamps. My developers
> are asking me how to split the timestamp so that they can look at either
> the
> date or at the time portion.
The CAST-Operater is your friend:
est=# select now();
now
-------------------------------
2006-07-25 19:12:36.744262+02
(1 row)
test=# select now()::time;
now
-----------------
19:12:41.803128
(1 row)
test=# select now()::date;
now
------------
2006-07-25
(1 row)
test=#
HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===