Re: Timestamp and compatiblity with MySQL

From: Jurgen Defurne <defurnj(at)glo(dot)be>
To: daniel(at)nospam(dot)clacknet(dot)com, postgreSQL general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Timestamp and compatiblity with MySQL
Date: 2000-06-14 17:04:06
Message-ID: 3947BB06.C02AD431@glo.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)glo(dot)be

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Constantino Martins 2000-06-14 17:09:12
Previous Message Ed Loehr 2000-06-14 16:46:35 Re: Crosstab SQL Question