How to create month? [message #309807] |
Fri, 28 March 2008 23:11  |
tondapi
Messages: 99 Registered: August 2007 Location: usa
|
Member |
|
|
Hi,
By using this query
to_char(summary date,'Mmm') i get Jan, That's fine.
My problem is how can i get Fed month by using above function.
User want to see the values like Jan-Feb,Feb-Mar,......Nov-Dec.
How can i get this one .Kindly help me.
|
|
|
|
|
Re: How to create month? [message #309815 is a reply to message #309807] |
Sat, 29 March 2008 01:09   |
mshrkshl
Messages: 247 Registered: September 2006 Location: New Delhi
|
Senior Member |
|
|
use add_months function
example:-
SQL> ed
Wrote file afiedt.buf
1 select to_char(sysdate,'Mon')
2 ||'-'
3* ||to_char(add_months(sysdate,1),'Mon') from dual
SQL> /
TO_CHAR
-------
Mar-Apr
regards,
|
|
|
Re: How to create month? [message #309825 is a reply to message #309815] |
Sat, 29 March 2008 01:35  |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
@mshrkshl
Don't put solution only hint or clue as requested in OraFAQ Forum Guide, "Responding to Posts" section:
Quote: | When responding to questions, if it is obviously a student with a homework assignment or someone else just learning, especially in the homework and newbies forums, it is usual to provide hints or clues, perhaps links to relevant portions of the documentation, or a similar example, to point them in the right direction so that they will research and experiment on their own and learn, and not provide complete solutions to problems. In cases where someone has a real-life complex work problem, or at least it may seem complex to them, it may be best to provide a complete demo and explanation.
|
Regards
Michel
|
|
|