Re: Time Formatting - Mailing list pgsql-novice

From Andrew McMillan
Subject Re: Time Formatting
Date
Msg-id 1021090566.4528.5.camel@kant.mcmillan.net.nz
Whole thread Raw
In response to Re: Time Formatting  (hodges@xprt.net)
Responses Re: Time Formatting
List pgsql-novice
On Sat, 2002-05-11 at 13:31, hodges@xprt.net wrote:
> SELECT to_char( timestamp, 'HH12:MI am') FROM feasts;
> or                time
> from psql prompt gives
> Function 'to_char(time, unknown)' does not exist
> Unable to identify a function that satisfies the given argument types
> you may need to add explicit typecasts
> time has the type of time

SELECT to_char( mytimefield::timestamp, 'HH12:MI am') FROM feasts;

And I can't recommend strongly enough that you read the manual, which is
quite clear on this sort of thing.

Regards,
                    Andrew.

> >
> > And for lots more information, look at the docs:
> >
> > >
> > > On 9 May 2002 at 20:55, Larry Rosenman wrote:
> > >
> > > > look at the to_char function on
> > > > http://www.lerctr.org/postgresql/functions-formatting.html
> > > >

--
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?


pgsql-novice by date:

Previous
From: hodges@xprt.net
Date:
Subject: Re: Time Formatting
Next
From: hodges@xprt.net
Date:
Subject: Re: Time Formatting