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." <[EMAIL PROTECTED]>
>Sent: Jul 11, 2006 7:34 AM
>To: [email protected]
>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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] and delete this
>email from your records.
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster