Re: Timestamp to date conversion...plz help me

From: nolan(at)celery(dot)tssi(dot)com
To: Jitender(dot)Chakka(at)igate(dot)com (Jitender Kumar C)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Timestamp to date conversion...plz help me
Date: 2003-10-18 19:56:57
Message-ID: 20031018195657.5301.qmail@celery.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I want to extract date part (mm/dd/yy or any other date format) of Time=
> stamp in postgreSQL. Can anyone help me out how I can proceed?.

You have at least two choices:

select current_timestamp::date;

will give you the date in the default date format.

select to_char(current_timestamp,'mm/dd/yy');

gives you control over the formatting.
--
Mike Nolan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2003-10-18 20:11:44 Re: 7.4b4 domain usage and select question
Previous Message Robert Creager 2003-10-18 19:56:10 Re: 7.4b4 domain usage and select question