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 8637FD1B182 for ; Wed, 21 Jul 2004 05:34:01 -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 93154-10 for ; Wed, 21 Jul 2004 08:33:42 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by svr1.postgresql.org (Postfix) with SMTP id 03A8FD1B38F for ; Wed, 21 Jul 2004 05:33:39 -0300 (ADT) Received: by mproxy.gmail.com with SMTP id d5so825314rng for ; Wed, 21 Jul 2004 01:33:38 -0700 (PDT) Received: by 10.38.71.36 with SMTP id t36mr79641rna; Wed, 21 Jul 2004 01:33:38 -0700 (PDT) Message-ID: <235b1a2804072101335eda05fd@mail.gmail.com> Date: Wed, 21 Jul 2004 16:33:38 +0800 From: azah azah To: pgsql-sql@postgresql.org Subject: Please help me.. problem in to_char Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.9 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS X-Spam-Level: X-Archive-Number: 200407/143 X-Sequence-Number: 18395 Hi, I want convert from mysql to postresql, previously in mysql the code as below: SELECT t2.id, t2.name, date_format(t1.created,\'%W %M %e, %Y - %r\') In postresql no date_format function, we need to use to_char function but it still work because still need to put ::date such as SELECT to_char('2005-03-27'::date,'DD/MM/YYYY'); How can i put ::date beside t1.created to get the output? Any idea??