Home » Developer & Programmer » Reports & Discoverer » date to year and quarter (oracle 10.1.2)
date to year and quarter Fri, 25 July 2008 08:48
 aarti81 Messages: 235Registered: December 2007 Location: USA Senior Member
Hi Can any one tell me a simple calculation to convert
date to year and quarter?

thnks
Re: date to year and quarter [message #336279 is a reply to message #336277] Fri, 25 July 2008 08:50
 BlackSwan Messages: 25478Registered: January 2009 Location: SoCal Senior Member
 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 #336281 is a reply to message #336279] Fri, 25 July 2008 09:05
 aarti81 Messages: 235Registered: December 2007 Location: USA Senior Member
Thank you sir

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 #336285 is a reply to message #336277] Fri, 25 July 2008 09:14
 BlackSwan Messages: 25478Registered: January 2009 Location: SoCal Senior Member
http://www.orafaq.com/forum/t/88153/0/
Re: date to year and quarter [message #336300 is a reply to message #336285] Fri, 25 July 2008 09:57
 aarti81 Messages: 235Registered: December 2007 Location: USA Senior Member
Never belittle anyone for asking beginner-level questions or for their English skills.

 anacedent wrote on Fri, 25 July 2008 09:14 http://www.orafaq.com/forum/t/88153/0/ Please read & follow Posting Guideline as stated in URL above

Re: date to year and quarter [message #336302 is a reply to message #336300] Fri, 25 July 2008 10:07
 Michel Cadot Messages: 64961Registered: March 2007 Location: Nanterre, France, http://... Senior MemberAccount Moderator
aarti81 wrote on Fri, 25 July 2008 16:57
Never belittle anyone for asking beginner-level questions or for their English skills.

 anacedent wrote on Fri, 25 July 2008 09:14 http://www.orafaq.com/forum/t/88153/0/ Please read & follow Posting Guideline as stated in URL above

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

 Previous Topic: Using FTP in Report Next Topic: Picture from DB
Goto Forum:

Current Time: Wed Jun 28 00:40:24 CDT 2017

Total time taken to generate the page: 0.05060 seconds