X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6538B9FB2CE for ; Tue, 11 Jul 2006 09:02:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 37011-02 for ; Tue, 11 Jul 2006 09:02:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 401FE9FB2C2 for ; Tue, 11 Jul 2006 09:02:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from elasmtp-mealy.atl.sa.earthlink.net (elasmtp-mealy.atl.sa.earthlink.net [209.86.89.69]) by svr4.postgresql.org (Postfix) with ESMTP id BB1F35AF05F for ; Tue, 11 Jul 2006 12:02:25 +0000 (GMT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=JgFV6cdIj1RLze/qEDJD9iiMqUOC3P45KFX1gC7wSFfetj8Cut8kpACDRXfSUgbl; h=Message-ID:Date:From:Reply-To:To:Subject:Cc:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [209.86.224.37] (helo=elwamui-karabash.atl.sa.earthlink.net) by elasmtp-mealy.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1G0Gwa-0003Bk-9f; Tue, 11 Jul 2006 08:02:24 -0400 Received: from 129.33.49.251 by webmail.pas.earthlink.net with HTTP; Tue, 11 Jul 2006 08:02:24 -0400 Message-ID: <18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net> Date: Tue, 11 Jul 2006 08:02:24 -0400 (GMT-04:00) From: Stuart Reply-To: Stuart To: pgsql-sql@postgresql.org Subject: Re: above the date functionssssssss Cc: "Penchalaiah P." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: EarthLink Zoo Mail 1.0 X-ELNK-Trace: 7deb539a379e73741aa676d7e74259b7b3291a7d08dfec795073f5815c4d5d0fa85383c8497f293d350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 209.86.224.37 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/175 X-Sequence-Number: 25749 Penchal reddy, You should be able to use extract or date_trunc functions like in the documentation: example: SELECT EXTRACT(MONTH FROM DATE '2005-02-12') | "-" | EXTRACT(YEAR FROM DATE '2005-02-12'); or SELECT date_trunc('month', DATE '2005-02-12') | "-" | date_trunc('year', DATE '2005-02-12'); Stuart -----Original Message----- >From: "Penchalaiah P." >Sent: Jul 11, 2006 7:34 AM >To: pgsql-sql@postgresql.org >Subject: [SQL] above the date functionssssssss > > >Hi good evening to every one......... > > >i want to get month and year in the current date.. >see this is date 2005-02-12... here date is 12 , month is 02 and year is >2005.. >but i want format like 02-2005... > >can u tell me how to do this > > > > >Thanks & Regards > >Penchal reddy | Software Engineer > > >Infinite Computer Solutions | Exciting Times...Infinite Possibilities... > > >SEI-CMMI level 5 | ISO 9001:2000 > >IT SERVICES | BPO > > >Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities | >Retail & Distribution | Government > > >Tel +91-80-5193-0000(Ext:503)| Fax +91-80-51930009 | Cell No >+91-9980012376|www.infics.com > > >Information transmitted by this e-mail is proprietary to Infinite >Computer Solutions and/ or its Customers and is intended for use only by >the individual or entity to which it is addressed, and may contain >information that is privileged, confidential or exempt from disclosure >under applicable law. If you are not the intended recipient or it >appears that this mail has been forwarded to you without proper >authority, you are notified that any use or dissemination of this >information in any manner is strictly prohibited. In such cases, please >notify us immediately at info.in@infics.com and delete this mail from >your records. > > > > > > >Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.