Splitting Timestamps

From: "Chris Hoover" <revoohc(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Splitting Timestamps
Date: 2006-07-25 16:54:35
Message-ID: 1d219a6f0607250954u55d0edbaq93b80c3cbd052451@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2006-07-25 17:03:53 Re: Splitting Timestamps
Previous Message Stephan Szabo 2006-07-25 16:38:02 Re: CASE statement and SETOF values