X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6957BD1B269 for ; Wed, 21 Jul 2004 10:19:38 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24696-07 for ; Wed, 21 Jul 2004 13:19:19 +0000 (GMT) Received: from tomts25-srv.bellnexxia.net (tomts25-srv.bellnexxia.net [209.226.175.188]) by svr1.postgresql.org (Postfix) with ESMTP id 70A39D1B381 for ; Wed, 21 Jul 2004 10:19:14 -0300 (ADT) Received: from acer.sympatico.ca ([65.95.133.86]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20040721131912.XBAP28143.tomts25-srv.bellnexxia.net@acer.sympatico.ca> for ; Wed, 21 Jul 2004 09:19:12 -0400 Message-Id: <5.2.1.1.0.20040721091432.00ac22b0@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Wed, 21 Jul 2004 09:17:45 -0400 To: pgsql-sql@postgresql.org From: Frank Bax Subject: Re: date_format in postresql In-Reply-To: <235b1a28040720205322cc291c@mail.gmail.com> References: <1090377577.12565.13.camel@jester> <235b1a28040720175570f4225a@mail.gmail.com> <1090377577.12565.13.camel@jester> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/150 X-Sequence-Number: 18402 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 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 > >