From: | "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | Kevin Heflin <kheflin(at)shreve(dot)net> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] extracting date information? |
Date: | 1998-05-19 09:58:48 |
Message-ID: | Pine.LNX.3.96.980519095600.412C-100000@proxy.bazzanese.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 18 May 1998, Kevin Heflin wrote:
> Any hints or clues on this one?
> Using Postgresql6.3 and PHP2
>
> I have a simple database with a list of events, one of the fields is of
> the data type "date".
>
> When I call this information from the database, it prints out the date
> in the form of "1998-05-05"
>
> What I would really like to do, when this date is retrieved, Is to
> format it something like "Thursday May 5, 1998" Anything more
> descriptive than "1998-05-05" would be great.
>
> I've tried using the "date(format,date)" call from PHP by saving the
> date in a variable, then:
> echo date("YMdl","$thedate");
>
> But when it is displayed it always prints out this date:
> "1969Dec31Wednesday"
>
> Any suggestions or comments would be appreciated.
>
If you use "datetime" type instead of "date" and set datestyle = 'Postgres'
your data will be like: Sat Dec 12 00:00:00 1998 CET
instead of: 1998-12-12
Jose'
From | Date | Subject | |
---|---|---|---|
Next Message | Jose' Soares Da Silva | 1998-05-19 12:24:31 | pg_dump error |
Previous Message | Philip Bierhoff | 1998-05-19 09:15:25 | About Deleting Large Objects |