Re: Confused by to_char

From: mike <mike(at)redtux1(dot)uklinux(dot)net>
To: Ragnar Hafstað <gnari(at)simnet(dot)is>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Confused by to_char
Date: 2005-02-08 17:47:22
Message-ID: 1107884842.5972.23.camel@datacc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2005-02-08 at 13:00 +0000, Ragnar Hafstað wrote:
> On Tue, 2005-02-08 at 12:28 +0000, mike wrote:
> > I am am trying to get a day string from a date using to_char ie:
> >
> > SELECT date1,ti1 ,to1,ti2,to2,adj,ei,eo,to_char('2005-02-07','Day') FROM
> > vw_times_list1
> >
> > however I get
> >
> > function to_char("unknown", "unknown") is not unique
>
> test=# select to_char('2005-02-07'::date,'Day');
> to_char
> -----------
> Monday
> (1 row)
>
>

thanks for this - I found the solution to my immediate problem by
looking through a dump for to_char and found the function I was looking
for at the moment (dayname) but this will be useful for the general case

Mike
> gnari
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lonni J Friedman 2005-02-08 17:52:03 Re: Cannot connect to Database
Previous Message bernd 2005-02-08 17:46:00 Cannot connect to Database