|
Re: 256 th day in the year [message #324314 is a reply to message #324312] |
Sun, 01 June 2008 23:39 ![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) |
![](http://www.orafaq.com/forum/images/custom_avatars/136107.jpg) |
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
kishorebonthala wrote on Sun, 01 June 2008 21:36 | Hi friend,
I have one query..
I want to know the 256th in the year.
Exp: In a year 365 days are there, so i want to know 256 th day in that present year. Is it Monday,Tuesday.....
Regards,
Kishore
|
what does this question have to do with Oracle?
It is a simple calendar problem?
> Is it Monday,Tuesday.....
Does the answer depend upon which year the question is asked?
[Updated on: Sun, 01 June 2008 23:40] by Moderator Report message to a moderator
|
|
|
|
Re: 256 th day in the year [message #324380 is a reply to message #324312] |
Mon, 02 June 2008 04:36 ![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) |
S.Rajaram
Messages: 1027 Registered: October 2006 Location: United Kingdom
|
Senior Member |
|
|
SQL> select to_char(to_date('2008256','YYYYDDD'),'DAY') from dual;
TO_CHAR(TO_DATE('2008256','YYY
---------------------------------------------------------------------------
FRIDAY
For more information check the date formatting in sql reference manual.
Regards
Raj
|
|
|
Re: 256 th day in the year [message #324386 is a reply to message #324380] |
Mon, 02 June 2008 04:48 ![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) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68653 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
@Raj,
What about this part of OraFAQ Guide:
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
|
|
|
Re: 256 th day in the year [message #324397 is a reply to message #324386] |
Mon, 02 June 2008 05:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
S.Rajaram
Messages: 1027 Registered: October 2006 Location: United Kingdom
|
Senior Member |
|
|
I know you would come to that. The reason why I posted the code is because
a) It's monday morning and I am having fresh start
b) I am in a good mood
So I have posted the full solution. ![Smile](images/smiley_icons/icon_smile.gif)
Next time I will strictly adhere to the forum guidelines.
Regards
Raj
|
|
|