pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stuart <sfbarbee@earthlink.net>
To: pgsql-sql@postgresql.org
Cc: Penchalaiah P. <penchalaiahp@infics.com>
Subject: Re: above the date functionssssssss
Date: Tue, 11 Jul 2006 08:02:24 -0400 (GMT-04:00)
Message-ID: <18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net> (raw)

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." <penchalaiahp@infics.com>
>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.




view thread (4+ messages)  latest in thread

Message-ID: <18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net>
Permalink:  ../18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net/
Also on:    postgresql.org/message-id/18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sfbarbee@earthlink.net, penchalaiahp@infics.com
  Subject: Re: above the date functionssssssss
  In-Reply-To: <18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox