|
|
Re: date to year and quarter [message #336281 is a reply to message #336279] |
Fri, 25 July 2008 09:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aarti81
Messages: 235 Registered: December 2007 Location: USA
|
Senior Member |
|
|
Thank you sir
how about the following :
Select to_char(rec_date, 'yyyy') || to_char(rec_date, 'IW') As year_week,
to_char(rec_date, 'yyyy') || to_char(rec_date, 'mm') As year_month,
to_char(rec_date, 'yyyy') || '0' || to_char(rec_date, 'q') As year_quarter,
to_char(rec_date, 'yyyy') As year
FROM tbltest
I think too, just because i asked a question doesnt mean i didnt try it before asking and if you dont like to answer u can always shutup instead of your comments.I asked because i have to use a calculation in discoverer plus and discoverer doesnt accept a select in its calculation.............
thnks
anacedent wrote on Fri, 25 July 2008 08:50 | aarti81 wrote on Fri, 25 July 2008 06:48 | Hi Can any one tell me a simple calculation to convert
date to year and quarter?
thnks
|
Use TO_CHAR() function & a little thought process.
|
|
|
|
|
|
Re: date to year and quarter [message #336302 is a reply to message #336300] |
Fri, 25 July 2008 10:07 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68679 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
aarti81 wrote on Fri, 25 July 2008 16:57 | Never belittle anyone for asking beginner-level questions or for their English skills.
|
Format your post and don't use IM speak.
In addition, YOU know you use discover, how could WE know it?
There is a Discover forum, maybe it is moire appropriate to post it in this place? Oh wait, this is also in the guide.
Regards
Michel
[Updated on: Fri, 25 July 2008 10:13] Report message to a moderator
|
|
|