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

Re: date_format in postresql

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: date_format in postresql
Date: 2004-07-21 13:17:45
Message-ID: 5.2.1.1.0.20040721091432.00ac22b0@pop6.sympatico.ca (view raw or flat)
Thread:
Lists: pgsql-phppgsql-sql
Check your version with:
         select version();
In the meantime, you could try
         date_part('epoch', submittime)
which will return a unix timestamp, you could then use functions within 
your scripting language to convert to human readable date formats.

Frank

At 11:53 PM 7/20/04, azah azah wrote:

>Thanks Chris and Rod.
>
>I think I have a problem because not many function existing in
>postresql that i installed.
>How can i get all the build-in functions because the basic function
>to_char is not existing in the database?
>
>On Tue, 20 Jul 2004 22:39:38 -0400, Rod Taylor <pg(at)rbt(dot)ca> wrote:
> > On Tue, 2004-07-20 at 20:55, azah azah wrote:
> > > Hi,
> > > I want convert from mysql to postresql,
> > > in mysql, query to database using the code as below:
> > >
> > > date_format(submittime, "%W %M %e, %Y - %r")
> >
> > to_char(submittime, 'format string')
> >
> > http://www.postgresql.org/docs/7.4/static/functions-formatting.html
> >


In response to

pgsql-php by date

Next:From: Rod TaylorDate: 2004-07-21 14:45:27
Subject: Re: date_format in postresql
Previous:From: azah azahDate: 2004-07-21 03:53:14
Subject: Re: date_format in postresql

pgsql-sql by date

Next:From: Markus BertheauDate: 2004-07-21 14:04:37
Subject: immutable function calling stable function
Previous:From: Theodore PetroskyDate: 2004-07-21 12:35:06
Subject: Re: Please help me.. problem in to_char

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