Re: Timestamp and compatiblity with MySQL - Mailing list pgsql-general

From Jurgen Defurne
Subject Re: Timestamp and compatiblity with MySQL
Date
Msg-id 3947BB06.C02AD431@glo.be
Whole thread Raw
In response to Timestamp and compatiblity with MySQL  (Daniel Mendyke <daniel@clacknet.com>)
List pgsql-general
Daniel Mendyke wrote:

> My application (in perl) has to portible
>
> between both MySQL and Postgres.  Most of
>
> the work is rather easy, but I'm having
>
> trouble with TIMESTAMP.
>
> MySQL allows me to use DATE_FORMAT( col_name, '%D %M %Y' )
>
> to format the data.  What function or method does Postgres
>
> provide for formating timestamp data?
>
> Thanks.
>
> -Daniel
>
> --
>
> To reach me remove the 'nospam.'
> my address is 'daniel at clacknet dot com'

Since postgreSQL time information is an integer, you don't need to
format timestamp data when inserting. All you need to do is obtain
somewhere your time information. The formatting needs only to
be done on retrieving the data.

Jurgen Defurne
defurnj@glo.be



pgsql-general by date:

Previous
From: Ed Loehr
Date:
Subject: Re: Crosstab SQL Question
Next
From: Jurgen Defurne
Date:
Subject: Re: Postgresql and programming