<div class="uc_pipe">|</div> <div id="aboutpanel" class="uc_aboutbox" style="display: none;" mce_style="display: none;">
A forum where peers share technical expertise, solve problems, and discuss issues related to the use of Oracle Databases. <div style="margin-top: 10px;" mce_style="margin-top: 10px;">
Home|
Invite Peers|
More Oracle Groups </div> </div>
<div class="grp_messageattrib">Reply from
Dan Hekimian-Williams on 10/26/2007 11:45 PM | Share</div><div
class="ach_votebox-collapsed"><div id="rateMsg1673090" style="display: none; visibility:
hidden;" mce_style="display: none; visibility: hidden;" class="ach_confirm-collapsed">Please
Sign In or Register to mark this reply as helpful.</div><div id="loading1673090" style="display: none; visibility: hidden;" mce_style="display: none; visibility: hidden;" class="ach_confirm-collapsed">
</div><div id="S1673090" class="ach_votecount">0</div>member
votes</div><div popupanchor="center" style="clear: left; padding-top: 10px; font: 10pt trebuchet ms;" mce_style="clear: left; padding-top: 10px; font: 10pt trebuchet ms;">If you use the 'D' format mask, it becomes much simpler...
<div style="margin-top: 15px;" mce_style="margin-top: 15px;">More White Papers...
</div> </div> </div> <div id="ctl00_ctl00_m_i_divThreadNavi"> <div style="font: 8pt verdana; margin-bottom: 10px; height: 20px; padding: 3px; border-top: 1px solid rgb(232, 232, 231); border-bottom: 1px solid rgb(232, 232, 231);"> <div style="float: right;
line-height: 18px; color: rgb(179, 179, 179);" mce_style="float: right; line-height: 18px; color: #b3b3b3;">
Next Message >Next Thread >> </div> <div style="float: left; line-height: 18px; color: rgb(179,
179, 179);" mce_style="float: left; line-height: 18px; color: #b3b3b3;">
<<
Previous Thread<
Previous Message </div> </div> </div> </div> <div id="ctl00_ctl00_m_i_pnlCollapsedReplyBoxUpperLocation"> </div> <div id="ctl00_ctl00_m_i_threadView"><div class="large" style="margin-bottom: 15px;" mce_style="margin-bottom: 15px;">17 Replies(sign in or
register for free to see full threads on a single page)</div><div class="grp_collapsethread">Hi!
All,Can anyone tell me --How to get ...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Asked by Venkata Ramana Prasad Pithani on 6/25/2003 6:27 AM</div></div><div
class="grp_collapsethread">Hii You can use the following query :-...<div style="padding-bottom: 5px;" mce_style="padding-bottom:
5px;"> Reply from Suraj Salyankar on 6/25/2003 6:50 AM</div></div><div class="grp_collapsethread">Suraj,But
this will give the First date ...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from deni... on 6/25/2003 7:19 AM</div></div><div class="grp_collapsethread">Hi
prasad, nbt_date is ur parameter...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from murali.i... on 6/25/2003 8:39 AM</div></div><div
class="grp_collapsethread">Try This.........this is in Sql server 2000.....<div style="padding-bottom:
5px;" mce_style="padding-bottom: 5px;"> Reply from
Rohit munjal on 10/25/2007 3:20 AM</div></div><div class="grp_collapsethread">hi
,i think we can also try this...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
akila baskaran on 10/26/2007 8:40 AM</div></div><div class="grp_collapsethread">hai
Akila, Thanks ... for ur query......<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Rinson M V on 10/26/2007 9:00 AM</div></div><div class="grp_collapsethread">If you use the 'D'
format mask, it becomes much si...
Reply from Dan Hekimian-Williams on 10/26/2007 11:45 PM --
current message</div><div class="grp_collapsethread">Hi,Thanks....The
query seems very s...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
akila baskaran on 10/27/2007 12:20 AM</div></div><div class="grp_collapsethread">Here's
another solution using the TRUNC function. ...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Balaji Calluru on 10/29/2007 1:45 PM</div></div><div class="grp_collapsethread">This
is sooper...., from http://forums.oracle.com/...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
USER_1737975 on 10/1/2009 9:45 AM</div></div><div class="grp_collapsethread">Hi
If your question is to get start date & en...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Sandeep Garg on 10/3/2009 10:50 AM</div></div><div class="grp_collapsethread">Hi
If your question is to get start date & en...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Sandeep Garg on 10/3/2009 11:00 AM</div></div><div class="grp_collapsethread">http://oracle.ittoolbox.com/groups/technical-funct...<div
style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Sandeep Garg on 10/3/2009 11:00 AM</div></div><div class="grp_collapsethread">Hi
If your question is to get start date & en...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Sandeep Garg on 10/3/2009 11:15 AM</div></div><div class="grp_collapsethread">Hi
If your question is to get start date & en...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Sandeep Garg on 10/3/2009 11:15 AM</div></div><div class="grp_collapsethread">Hi
If your question is to get start date & en...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Sandeep Garg on 10/3/2009 11:15 AM</div></div><div class="grp_collapsethread">Hi
If your question is to get start date & en...<div style="padding-bottom: 5px;" mce_style="padding-bottom: 5px;"> Reply from
Sandeep Garg on 10/3/2009 11:45 AM</div></div></div> </div> <div id="ctl00_ctl00_m_i_pnlReplyBoxLowerLocation"> <div id="ctl00_ctl00_m_i_replyBoxAll" style="margin: 17px 0pt;" mce_style="margin:
17px 0pt;"> <div class="uc_loungetop">
<input name="ctl00$ctl00$m$i$replyBody" id="ctl00_ctl00_m_i_replyBody" type="hidden"> </div> </div> <div id="ctl00_ctl00_m_i_replyForm"><div id="ctl00_ctl00_m_i_topReplySection"><div id="ctl00_ctl00_m_i_pnlReplyBox">
<div id="ctl00_ctl00_m_i_postBox">Ignore this text box. It is used to detect spammers. If you fill out this field, your message will rejected.<input
gtbfieldid="3" name="ctl00$ctl00$m$i$username" id="ctl00_ctl00_m_i_username" type="text">
Member
129 Points
242 Posts
First and last day of a week.
May 27, 2010 03:43 AM|Ozo|LINK
Hi,
I get the today date, and I want to find first and last day of a week, and today date is between first and last day of the week.
Participant
1911 Points
443 Posts
Re: First and last day of a week.
May 27, 2010 04:29 AM|beharavenkata@gmail.com|LINK
select DATEADD(wk, DATEDIFF(wk, 6, GETDATE()), 6)
select DATEADD(wk, DATEDIFF(wk, 5, GETDATE()), 5)
Nanda
Star
10925 Points
2218 Posts
Re: First and last day of a week.
May 27, 2010 04:32 AM|Steelymar|LINK
in C# is:
Contributor
7260 Points
1902 Posts
Re: First and last day of a week.
May 27, 2010 04:36 AM|nareshguree23@gmail.com|LINK
select to_char(sysdate,'Dy DD-Mon-YYYY') today,
to_char(sysdate+ (1-to_char(sysdate,'D')),'Dy DD-Mon-YYYY') startofwk,
to_char(sysdate+ (7-to_char(sysdate,'D')),'Dy DD-Mon-YYYY') endofwk from dual
happy coding
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;" id="_mcePaste">Oracle Database
<div class="uc_pipe">|</div>How to get Start Date and End Date of a Week??
<div class="grp_messageattrib">Reply from Dan Hekimian-Williams on 10/26/2007 11:45 PM | Share</div><div class="ach_votebox-collapsed">votes</div><div popupanchor="center" style="clear: left; padding-top: 10px; font: 10pt trebuchet ms;" mce_style="clear: left; padding-top: 10px; font: 10pt trebuchet ms;">If you use the 'D' format mask, it becomes much simpler...
D is day of the week 0=Sunday, 6=Saturday
SQL> list
1 select
2 to_char(sysdate,'Dy DD-Mon-YYYY') today,
3 to_char(sysdate+ (1-to_char(sysdate,'D')),'Dy DD-Mon-YYYY') startofwk,
4 to_char(sysdate+ (7-to_char(sysdate,'D')),'Dy DD-Mon-YYYY') endofwk
5* from dual
SQL> /
TODAY STARTOFWK ENDOFWK
--------------- --------------- ---------------
Fri 26-Oct-2007 Sun 21-Oct-2007 Sat 27-Oct-2007
Now you just need to decide what day is the first day of the week
(Sunday or Monday...) and perhaps add one.
Dan</div><div id="ctl00_ctl00_m_i_ctl02_Div1" style="margin: 15px 0px;" mce_style="margin: 15px 0px;"> Related White Papers and Webcasts
</div> </div> </div> <div id="ctl00_ctl00_m_i_divThreadNavi"> <div style="font: 8pt verdana; margin-bottom: 10px; height: 20px; padding: 3px; border-top: 1px solid rgb(232, 232, 231); border-bottom: 1px solid rgb(232, 232, 231);"> <div style="float: right; line-height: 18px; color: rgb(179, 179, 179);" mce_style="float: right; line-height: 18px; color: #b3b3b3;"> Next Message > Next Thread >> </div> <div style="float: left; line-height: 18px; color: rgb(179, 179, 179);" mce_style="float: left; line-height: 18px; color: #b3b3b3;"> << Previous Thread < Previous Message </div> </div> </div> </div> <div id="ctl00_ctl00_m_i_pnlCollapsedReplyBoxUpperLocation"> </div> <div id="ctl00_ctl00_m_i_threadView"><div class="large" style="margin-bottom: 15px;" mce_style="margin-bottom: 15px;">17 Replies (sign in or register for free to see full threads on a single page)</div>
Reply from Dan Hekimian-Williams on 10/26/2007 11:45 PM -- current message</div>
Post Reply <div id="loadingNotification" style="float: right; font: 8pt verdana; padding: 5px 5px 8px 4px; height: 15px; width: 185px; margin: -2px 150px 0px 0px; display: none;">
<div class="uc_notifiertext">Loading...</div> </div>
</div></div> </div> </div> <div id="ctl00_ctl00_m_i_signindiv" style="display: none;" mce_style="display: none;"> <div id="ctl00_ctl00_m_i_pnlSignin">
More on This Topic