From: | Stuart <sfbarbee(at)earthlink(dot)net> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Cc: | "Penchalaiah P(dot)" <penchalaiahp(at)infics(dot)com> |
Subject: | Re: above the date functionssssssss |
Date: | 2006-07-11 12:02:24 |
Message-ID: | 18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)infics(dot)com>
>Sent: Jul 11, 2006 7:34 AM
>To: pgsql-sql(at)postgresql(dot)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(dot)in(at)infics(dot)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(dot)in(at)infics(dot)com and delete this email from your records.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-07-11 12:10:21 | Re: above the date functionssssssss |
Previous Message | A. Kretschmer | 2006-07-11 12:02:07 | Re: above the date functionssssssss |