How can i get 2nd week starting date and ending date in a month?

please help me to query this.
thanks in advance

Hi,
I assume the second week start the next monday after the 1st of the current month. End of week is the next sunday.
If a week start monday, the second week of december start the 5th and ending the 11th :
  1  select 8-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D')+1 first_day2w,
  2         15-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D') last_day2w
  3* from dual
SQL> /
FIRST_DAY2W LAST_DAY2W
          5         11If we take august, the second week start the 8th to end the 14th
  1  select 8-to_char(to_date('01082005','DDMMYYYY'),'D')+1 first_day2w,
  2         15-to_char(to_date('01082005','DDMMYYYY'),'D') last_day2w
  3* from dual
SQL> /
FIRST_DAY2W LAST_DAY2W
          8         14HTH,
Nicolas.
Note that my nls_territory = FRANCE.
if you're in America, first day of week is sunday, and last is saturday :
  1* alter session set NLS_TERRITORY='AMERICA'
SQL> /
Session altered.
SQL> ed
Wrote file afiedt.buf
  1  select 8-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D')+1 first_day2w,
  2         15-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D') last_day2w
  3* from dual
SQL> /
FIRST_DAY2W LAST_DAY2W
          4         10
SQL> Message was edited by:
N. Gasparotto

Similar Messages

  • On my Mac Pro how can I get voiceover to start reading at a specific point on a document?, on my Mac Pro how can I get voiceover to start reading at a specific point on a document?

    On my Mac Pro how can I get voiceover to start reading at a specific point in a document, and then continue on to the next paragraph and so on?  Thank you.  Ed

    Welcome to the Apple family!!!! 
    How can I cause the VO cursor(box) show-up/start?
    Press Control-Option and F5.   The F5 key is located on the top row of keys 6th key over.  This is a toggling "Keyboard Shortcut" for turning VoiceOver on and off.
    How can I move the VO cursor to various sentences or paragraphs of an article and have it start reading ... and perhaps even continue reading on to the next paragraph(s) ... even to the end of the article?
    How to read a website with VoiceOver
    Step 1:  Go to the Website
    A quick keyboard shortcut is Command-L.  This will jump you up to the address bar.  Start typing where you want to go.  i.e "www.thewebsite.com"
    Step 2:  Working with Webpage
    VoiceOver will automatically start reading the website.  You can pause the speech by hitting the 'Control Button'. 
    If VoiceOver does not being reading the webpage, then you might have to "Interact" with it.  If VoiceOver say "HTML Content" then press Control-Option-Space-Down Arrow to interact with the webpage.
    Use Control-Option-Right Arrow to move throught the website.  This will speak "EVERYTHING" on the page.
    Most website that I've found have their articles labeled as 'Heading'.  You can jump from heading to heading, by pressing Control-Option-Shift-H.
    If you'd like an itemized alphabetical listing of the site, press Control-Option-I 
    Press Control-Option-Space on the link or article you want to view.
    Step 3.  Reading from Top to Bottom
    Once you found and clicked on the the article/link, use the same 'Heading' command, Control-Option-Shift-H to find the title. 
    After finding the title, press Control-Option-A will start reading from the title on. 
    Note:  If there are any other items (ads, pictures, etc) it will read those too. 
    Tip:  You might be able to activate a feature called the 'Reader'.  The Reader isolates the article and elimanates the ads  The keyboard command is Shift-Command-R.  You can also find it in the Menu Bar (Command-Option-M) under the word 'View' then 'Show Reader'. 
    I am using a MACPro with OSX, probably Mavericks 10.9 (where would I look to see if that is the correct information?)
    You can find this information under the 'Apple menu' in the Menu Bar.  To access the Menu Bar, press Control-Option-M. 
    Go to Apple Menu > About This Mac.  This will open up another window.  Use Control-Option-Right Arrow until you hear 'Version'.  If you purchased it brand new from Apple within the last six month, more than likely you have Mavericks. 
    Recommanded Articles. 
    AppleVis- Commonly used Keyboard Commands
    Chapter 2: Learning VoiceOver Basics
    Chapter 6: Browsing the internet
    Apple Accessibility Resource Page
    The  'Commands Help' Voiceover Menu. Control-Option-H-H.  (hit H twice)  is my best friend.  It's a searchable VoiceOver Menu with most of the VoiceOver command.  Example:  You are looking for the 'Read Current Paragraph' keyboard command.   Press Control-Option-H-H and then type Paragraph.  It will then bring up all the commands with the word paragraph.  I believe there are three.   
    As from the Trackpad Commands, I've copied and pasted below from Appendix A: Commands and Gestures
    VoiceOver standard gestures
    If you’re using a Multi-Touch trackpad, you can use VoiceOver gestures. VoiceOver provides a set of standard gestures for navigating and interacting with items on the screen. You can’t modify this set of gestures.
    NOTE:Gestures that don’t mention a specific number of fingers are single-finger gestures.
    General
    Enable the Trackpad Commander and VoiceOver gestures
    VO-Two-finger rotate clockwise
    Disable the Trackpad Commander and VoiceOver gestures
    VO-Two-finger rotate counterclockwise
    Turn the screen curtain on or off
    Three-finger triple-tap
    Mute or unmute VoiceOver
    Three-finger double-tap
    Navigation
    Force the VoiceOver cursor into a horizontal or vertical line when you drag a finger across the trackpad
    Hold down the Shift key and drag a finger horizontally or vertically
    Move the VoiceOver cursor to the next item
    Flick right
    Move the VoiceOver cursor to the previous item
    Flick left
    Move content or the scroll bar (depending on the Trackpad Commander setting)
    Three-finger flick in any direction
    Go to the Dock
    This gesture moves the VoiceOver cursor to the Dock wherever it’s positioned on the screen
    Two-finger double-tap near the bottom of the trackpad
    Go to the menu bar
    Two-finger double-tap near the top of the trackpad
    Open the Application Chooser
    Two-finger double-tap on the left side of the trackpad
    Open the Window Chooser
    Two-finger double-tap on the right side of the trackpad
    Jump to another area of the current application
    Press Control while touching a finger on the trackpad
    Interaction
    Speak the item in the VoiceOver cursor or, if there isn’t an item, play a sound effect to indicate a blank area
    Touch (includes tap or dragging)
    Select an item
    Double-tap anywhere on the trackpad
    You can also split-tap (touch one finger and then tap with a second finger on the trackpad)
    Start interacting with the item in the VoiceOver cursor
    Two-finger flick right
    Stop interacting with the item in the VoiceOver cursor
    Two-finger flick left
    Scroll one page up or down
    Three-finger flick up or down
    Escape (close a menu without making a selection)
    Two-finger scrub back and forth
    Increase or decrease the value of a slider, splitter, stepper, or other control
    Flick up (increase) or flick down (decrease)
    Text
    Read the current page, starting at the top
    Two-finger flick up
    Read from the VoiceOver cursor to the end of the current page
    Two-finger flick down
    Pause or resume speaking
    Two-finger tap
    Describe what’s in the VoiceOver cursor
    Three-finger tap
    Change how VoiceOver reads text (by word, line, sentence, or paragraph)
    Press the Command key while touching a finger on the trackpad
    Rotor
    Change the rotor settings
    Two-finger rotate
    Move to the previous item based on the rotor setting
    Flick up
    Move to the next item based on the rotor setting
    Flick down
    To customize other gestures by assigning VoiceOver commands to them, use the Trackpad Commander.
    Assigning VoiceOver commands to gestures
    If you need a reminder about what a gesture does, press VO-K to start keyboard help, and then use the gesture on the trackpad and listen to the description.
    Learning about keys, keyboard shortcuts, and gestures
    Sorry lots of information.  Enjoy.  You

  • How can i get acsess to my data if my iphone is shut and can´t open any more??how can i get acsess to the memory card, how can i get acsess to my data if my iphone is shut and can´t open any more??how can i get acsess to the memory card

    how can i get acsess to my data if my iphone is shut and can´t open any more??how can i get acsess to the memory card????please help

    You can't. There is no memory card. It uses flash memory that's soldered to the logic board. If you didn't back it up, your data is gone.

  • IOS 8.1 - after update how can I get my lost calendar data back?

    Hi, after the update to iOS 8.1 is my calendar empy. All my appointements are gone and there is no way to safe new appointments in it. I tried to use the backup  of the data, but it did not work. Any clou how can I get my lost calendar data back? And or get the calendar working again???
    Thanks!

    You sign into whatever iCloud or Mail account the calendar was synced to, and enable the Calendar option for those accounts.

  • How can i get report between two dates?

    Hi
    how can i get report between two dates?
    for example i want get reports between 20/4/2002 & 27/4/2002.
    my table has date column and i can get first date( exam : .... where date:=a and/or ....i don't know this part)
    thanks alot.
    Regards
    The Oracle Reports Team
    http://otn.oracle.com/

    where exam_date between :from_date and :to_date
    from_date and to_date are user_parameter

  • Since iCloud weeks only start on a Sunday in iPad, preferences on iMac allow week to start on any day.  How can I change iPad week start to match iMac?

    Since iCloud weeks only start on a Sunday in iCal on my iPad 1, preferences on iMac allow week to start on any day. 
    How can I change iPad week start on a Monday and to match iMac?

    Hi,
    Go to Settings>General>International, and make sure that you have the appropriate "Region Format," and "Calendar" settings.
    Best wishes
    John M

  • My sent messages in outlook for mac suddenly stopped syncing with my iPhone and iPad, all other folders work correctly. How can I get them to start syncing again?

    My sent messages in outlook for mac suddenly stopped syncing with my iPhone and iPad, all other folders work correctly. How can I get them to start syncing again?

    You can disable the Adobe Reader plugin in Firefox (Tools > Add-ons > Plugins) and use the external Adobe Reader application or Preview application instead.
    *Firefox > Preferences > Applications > Adobe PDF document : Use Adobe Reader
    PDF files may also be found under another entry like Portable document.
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file

  • HT1212 my niece's device is locked fro 23 million minutes!!!! How can i get round without losing data as at 8 she hasnt backed up!

    my niece's device is locked for 23 million minutes!!!! How can i get round without losing data as at 8 she hasnt backed up!

    If you restore you will have to restore to latest Apple's software, that frankly *****. I did it and I completely regret. On iOS 6.1.5 NOTHING works.

  • How can I get i messages started

    How can I get I messages started? I've already signed but I am not able to send messages to people. Pleas help me

    the send button is grey and I can't send any thing

  • How can i get difference in base plan and actual/current plan for a project

    Hi PS Experts,
    How can i get difference in base plan and actual plan .
    For example-
    Project1 is created for 10 days (start and end date difference).
    Now in between -project is extended/changed for 12 days .
    What is the way to get 2 days as a difference in base plan and current plan.
    Thanks
    Suraj prakash

    Hi Suraj,
    You can follow a convention that -
    (1) Forecast Start/Finish dates: Used only for Primary planning, once initial planning is done you should not change these dates.
    Now, you will copy the same dates in Basic Start/Finish dates also.
    (2) Basic Start/Finish dates: Whatever changes are done after the initial planning, you will make the changes only in Basic Start/Finish dates.
    So, in Project Planning board, if you enable Forecast and Basic dates with different color coding, you can clearly see the variation in the Project schedule.
    Hope this helps.

  • My ipod reset itself it would not let me log into my old itunes account so  I made a new one how can I get to all my music and stuff.

    My ipod reset itself it would not let me log into my old itunes account so  I made a new one how can I get to all my music and stuff.

    To recovery yoyr existing account:
    Is there a way to find my Apple ID Name if I can't remember it?
    Yes. Visit My Apple ID and click Find your Apple ID. See Finding your Apple ID if you'd like more information.
    How do I change or recover a forgotten Apple ID Password?
    If you've forgotten your Apple ID Password or want to change it, go to My Apple ID and follow the instructions. SeeChanging your Apple ID password if you'd like more information.
    If necessary:
    Forgotten Security Questions/Answers
    You need to contact Apple by:
    1 - Use the Express lane and start here:
    https://expresslane.apple.com
    then click More Products and Services>Apple ID>Other Apple ID Topics>Forgotten Apple ID security questions.
    or
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    http://support.apple.com/kb/HE57
    or           
    Apple ID: Contacting Apple for help with Apple ID account security
    3 - Use your rescue email address if you set one up
    Rescue email address and how to reset Apple ID security questions
    For general  information see:
    Apple ID: All about Apple ID security questions

  • My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    Start up in Safe Mode.
    http://support.apple.com/kb/PH14204?viewlocale=en_US
    Repair Disk.
    http://support.apple.com/kb/PH5836
    Reset PRAM.
       http://support.apple.com/kb/PH14222

  • I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings?

    I had renamed my user login name and assumed that there will be no change in the settings and files. When I login with the new profile name everything is gone. How can I get back all my files and settings? Please help. Thanks.

    You should have asked this before you tried: Changing username or short name- User Account and Short Name- OS X- How to change user account name or home directory name.

  • I have an ipod nano 4th generation.  I let my grandson, who has a shuffle, connect his shuffle to my computer and now my itunes recognizes his shuffle and not my nano.  How can I get rid of his shuffle and re-add my nano

    have an ipod nano 4th generation.  I let my grandson, who has a shuffle, connect his shuffle to my computer and now my itunes recognizes his shuffle and not my nano.  How can I get rid of his shuffle and re-add my nano?

    Hi lundjj,
    Thanks for visiting Apple Support Communities.
    You may find the troubleshooting steps in this article helpful if your iPod nano does not appear in iTunes:
    iPod not appearing in iTunes
    http://support.apple.com/kb/ts3716
    This information can also help if you are using multiple devices with a computer:
    iPod for Windows: Connecting multiple iPod devices to iTunes
    http://support.apple.com/kb/ht3622
    Although FireWire and USB connections will allow multiple iPod devices to be connected to the computer at the same time, iTunes for Windows works best with only one iPod connected at a time. If you plan to connect multiple iPod devices to the same computer, eject any iPod devices that you are not using from iTunes.
    All the best,
    Jeremy

  • How can i get best practice for SD and MM

    Please, can any body tell me how can i get best practices for SD and MM for functional approach?
    Thanks
    Utpal

    Hello Utpal,
    I am really surprised, in just 10 minutes you searched that site and found it not useful. <b>Check out my previous reply "you will not find screen shot in this but you can add it in this"</b>
    You will not find readymade document, you need to add this as per your requirement.
    btw, the following link gives you some more link for new SAP guys, this will be helpful. <b>Check out HOW to BASIC transaction</b>
    New to Materials Management / Warehouse Management?
    Hope this helps.
    Regards
    Arif Mansuri

Maybe you are looking for