Skip site navigation (1) Skip section navigation (2)

Re: Date format

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Dylan Fogarty-MacDonald <dylan(dot)fm(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Date format
Date: 2006-07-31 05:38:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Jul 31, 2006, at 14:23 , Dylan Fogarty-MacDonald wrote:

> I am using PG 7.3.4.

I strongly recommend upgrading, if not to the latest 8.1.4, then to  
the most recent release of 7.3.15. These include patches to security  
flaws and data-loss-incurring bugs. 8.1.4 will most likely perform  
much better for you as well.

> if to_date() converts a string to date, what converts/formats date  
> to string?

I think you'll want to look at TO_CHAR: 

I've found it useful to use EXTRACT(EPOCH FROM your_timestamp) to  
pass the timestamp to PHP, and then use the PHP timestamp formating  

Hope this helps.

Michael Glaesemann
grzm seespotcode net

In response to

  • Date format at 2006-07-31 05:23:26 from Dylan Fogarty-MacDonald


pgsql-novice by date

Next:From: Michael GlaesemannDate: 2006-07-31 05:41:24
Subject: Re: Date format
Previous:From: Dylan Fogarty-MacDonaldDate: 2006-07-31 05:23:26
Subject: Date format

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group