Re: Looking for a way to get my time format.

From: Jason Earl <jdearl(at)yahoo(dot)com>
To: Eric Naujock <naujocke(at)abacusii(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Looking for a way to get my time format.
Date: 2001-06-04 14:27:06
Message-ID: 20010604142706.7590.qmail@web10002.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


What you need is the to_char() function. The
documentation for this function can be found here:

http://www.postgresql.org/idocs/index.php?functions-formatting.html

Here's an example of how you would use this function.

processdata=> select to_char(now(), 'YYYY-DD-MM
HH:MM:SS PM')
processdata-> ;
to_char
------------------------
2001-04-06 08:06:32 AM
(1 row)

Notice how the format string has PM in it but the time
returned is AM, that spooked me at first, but it seems
to work as one would hope.

Jason

--- Eric Naujock <naujocke(at)abacusii(dot)com> wrote:
> I am looking for a way to get my time format to
> display in the format of hh:mm AM/PM instead to the
> default 24 hour time format. Does anybody have any
> suggestions for how to do this?
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Daniel A. Melo 2001-06-04 15:30:22 problem with Timestamp
Previous Message Eric Naujock 2001-06-04 14:05:41 Looking for a way to get my time format.