Re: Need some help with dates

Поиск
Список
Период
Сортировка
От Gautham S. Rao
Тема Re: Need some help with dates
Дата
Msg-id 012801c1e60f$cbd86920$41057aa3@tatainfotech.com
обсуждение исходный текст
Ответ на Need some help with dates  (Stéphane DEWITTE <stephane@smeso.fr>)
Ответы Re: Need some help with dates  (Stéphane DEWITTE <stephane@smeso.fr>)
Список pgsql-sql
Hi Stéphane,

Use,
update mclis
set cli_date = to_date(temp.temp1,'dd/mm/yyyy')

Regards,
Gautham.

----- Original Message -----
From: "Stéphane DEWITTE" <stephane@smeso.fr>
To: <pgsql-sql@postgresql.org>
Sent: Wednesday, April 17, 2002 6:03 PM
Subject: [SQL] Need some help with dates


> Hi.
>
> First, let me apologize for my poor level in english, I hope you'll
> understand me.
>
> I'm new in PL/PgSQL, and I have a little problem.
>
> I have a temporary table (temp) with only varchar. I must do a request
that
> fill another table (mclis) with temp's data. But on the new tables, I have
a
> field in date format. When I make a
>
> update mclis
> set cli_date = temp.temp1
>
> he doesn't want because of the different formats ('column "cli_date" is of
> type 'date' but expression is of type 'character varying').
>
> In temp, my data are like 01/01/2001
>
> I tried also
> set cli_date = select case(temp.temp1 as date) but he says:
> Cannot cast type 'character' to 'date' or Cannot cast type 'character
> varying' to 'date'.
>
> Does anyone has an idea ?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>



В списке pgsql-sql по дате отправления:

Предыдущее
От: Stéphane DEWITTE
Дата:
Сообщение: Need some help with dates
Следующее
От: "Matteo Beccati"
Дата:
Сообщение: How to reset sequences on pre-7.1