Re: above the date functionssssssss

Поиск
Список
Период
Сортировка
От Stuart
Тема Re: above the date functionssssssss
Дата
Msg-id 18079148.1152619344305.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net
обсуждение исходный текст
Ответ на above the date functionssssssss  ("Penchalaiah P." <penchalaiahp@infics.com>)
Список 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@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
intendedfor 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
appearsthat this mail has been forwarded to you without proper authority, you are notified that any use or
disseminationof this information in any manner is strictly prohibited. In such cases, please notify us immediately at
info.in@infics.comand delete this email from your records.
 



В списке pgsql-sql по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: above the date functionssssssss
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: above the date functionssssssss