From: | Chris Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Splitting Timestamps |
Date: | 2006-07-25 17:55:14 |
Message-ID: | 60slkpa7st.fsf@dba2.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
revoohc(at)gmail(dot)com ("Chris Hoover") writes:
> 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. I know I can do a
> select to_date(now(),'yyyy-mm-dd') and it will return the date.
> However, how do I get the time? Also, is this the proper way to get
> the date portion of a timestamp? Thanks, Chris
Look at the function date_part(time_type, timestamp)
--
(format nil "~S(at)~S" "cbbrowne" "ntlug.org")
http://www3.sympatico.ca/cbbrowne/lsf.html
Do not worry about the bullet that has got your name on it. It will
hit you and it will kill you, no questions asked. The rounds to worry
about are the ones marked: TO WHOM IT MAY CONCERN.
From | Date | Subject | |
---|---|---|---|
Next Message | Reece Hart | 2006-07-25 17:56:16 | Re: Splitting Timestamps |
Previous Message | Philippe Lang | 2006-07-25 17:52:38 | Re: Plperl return_next and bytea binary data? |