Re: date functions

Поиск
Список
Период
Сортировка
От Darren Ferguson
Тема Re: date functions
Дата
Msg-id Pine.LNX.4.10.10202011121180.9106-100000@thread.crystalballinc.com
обсуждение исходный текст
Ответ на date functions  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Список pgsql-general
There is a Postgres function called to_char

Example:

SELECT a.tt_id,
       to_char(a.date_time_submitted,CAST('mm/dd/yyyy' AS text)) AS
date_time_submitted
FROM table a
WHERE a.tt_id = id

RESULT: id | 12/31/2001

Look in the format of the function it is in the documentation. The
formatiing will show you other notations this is just one of them that
fitted on of your examples.

Darren Ferguson

On Fri, 1 Feb 2002, Johnson, Shaunn wrote:

> Howdy:
>
> Silly question.  I want to display the date from
> my table in other formats.  Is this possible?
>
> For example, I have this:
>
> [example]
>
>     date
> ------------
>  2000-01-07
>
> [/example]
>
> And I want this:
>
> [example]
>
>     date
> ------------
>  20000107
>
> [/example]
>
>
> And maybe this:
>
>
> [example]
>
>     date
> ------------
>  01/07/2001
>
> [/example]
>
>
> Any suggestions?  Thanks!
>
> -X
>


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Function to Pivot data
Следующее
От: "omid omoomi"
Дата:
Сообщение: Re: date functions