Beginning of the Quarter and Beginning of the Semester of a Date.

Hi,
I'm writing a PL/SQL program and I'm facing the following problem:
I have a date D in the format 'dd/mm/yy' and I want to get the beggining of the quarter in which this date is located , and also the beginning of the semester in which the date is located. I want the beginning of the quarter and the beggining of the semester in the format 'dd/mm/yyyy' (which is the format of the date D).
For example, if my date D is 12/11/2007 , the beginning of the quarter is ,in the format 'dd/mm/yyyy', 01/10/2007, and the beginning of the semester is ,in the same format 'dd/mm/yyyy', 01/06/2007.
Thanks you in advance for your help.

I guess, that beginning of semester would be 01/07/2007 rather than 01/06/2007
Quarter : Just TRUNCATE your date with Format 'Q'
Semester: I think there is no format for semester, but with the formula below you can achieve it...
SELECT TRUNC(SYSDATE,'Q')
      ,TRUNC(ADD_MONTHS(sysdate,(1-MOD(TO_CHAR(SYSDATE,'Q'),2))*-3),'Q')
  FROM dual
/The result will be a date, so formatting is up to you.
hth

Similar Messages

  • When filling out a form, when I type in information in one field, move to the next and begin typing,

    when filling out a form, when I type information into the first field, move to the next and begin typing, the information in the prior field disappears

    Hey gregery,
    Please let me know what Acrobat version are you using.
    Also, go to File> Properties> Security and check whether form filling is allowed or not as shown below:
    Regards,
    Anubha

  • After reinstalling game, the achievements from Game Center doesn't uploaded to the game and starts from the beginning . All the achievements are seen in the Game Center . How could I upload the last progress into the game?

    After reinstalling game, the achievements from Game Center doesn't uploaded to the game and starts from the beginning . All the achievements are seen in the Game Center . How could I upload the last progress into the game?

    Hello there, Elena Lyubina.
    The following Knowledge Base article offers up some great steps for troubleshooting issues with an application not functioning as expected:
    iOS: An app you installed unexpectedly quits, stops responding, or won’t open
    http://support.apple.com/kb/ts1702
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • I do a movie whith iMovie. I finalize the project and I pass it to iDvd. Then I do a little menu and I burn my DVD. When I play my DVD on a computer or in my TV it ALWAYS begins directly with the movie and not with the menu... PLEASE HELP!!!!

    I do a movie whith iMovie. I finalize the project and I pass it to iDvd. Then I do a little menu and I burn my DVD. When I play my DVD on a computer or in my TV it ALWAYS begins directly with the movie and not with the menu... PLEASE HELP!!!!

    Go to the Map mode in your iDVD project and make sure the blue bin at the left is empty.  That's where you drag slideshows to if you want the DVD to open immediately to that slideshow and bypass the menu. 
    Click to view full size
    If there is an item in there drag it out.
    OT

  • Hi, i don't know what to do i´m desperate in the last few days had appeared brown spots all over one side of the charger and begin to appear on the other side, seem to be burns ....what can i do? :s

    hi, i don't know what to do i´m desperate in the last few days had appeared brown spots all over one side of the charger and begin to appear on the other side, seem to be burns ....what can i do? :s.... its is the first time it happened this to my charger  in my three mac i had ....

    Hmmmmm....
    Does it get overly hot when used?
    Can't decide whether they are the product of overheating or merely that someone sprayed some product nearby, that was incompatible with the plastic.
    Ok, si compraste y registraste el equipo, tus datos estan en linea y el proveedor verificara el estatus de la garantia a traves del numero de serie. Tambien lo puedes consultar aqui:  https://selfsolve.apple.com/

  • When my iphone 4s goes completely dead how long should it take to recognize the charger and begin to charge?

    when my iphone 4s goes completely dead how long should it take to recongize the charger and begin to charge?

    How do you know it is not charging? Do you see anything on the screen at all? Have you tried a reset? Hold the sleep/wake and home buttons until you see the Apple logo and then release. If the phone was completly dead, it may take up to 15 seconds or more for the Apple logo to appear.

  • TS1702 In pages, when I get to the end of a line, the text refuses to start again in the left, it continues on the right and goes down the page, anyone know a solution?

    In pages, when I get to the end of a line, the text refuses to start again in the left, it continues on the right and goes down the page, anyone know a solution?

    Does this occur in all of your Pages documents? Are you certain that you haven't formatted the type to run flush right? (Align right I mean - sorry old typographer lingo). Look at the ruler at the top and check the Align setting.
    Have you tried quitting Pages completely and the restart the iPad?
    Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • A document page opens that is too big for the display and runs off the end of the monitor

    How do you fix a problem where document pages open that are too big for the display and runs off the end of the monitor? The borders are off the monitor so there is no window edge to grab and adjust.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and  Wi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • I have photo shop elements11, i had an older version how do i get to put new photos on the discs i have without having to erase the disc and losing al the data

    ihad an older version of photoshop elements where i had collections in the right hand column and on disc i have now opened albums and added new photos but when i try to put them on the disc it says arase the disc and lose all the data, do i have to put them on a new disc and end up with a useless disc,

    You can only use the App Store version to reinstall on your new Mac if you bought Logic via the App Store in the first place.... and then it will appear under the Purchases tab in the Mac App Store App so long as you are signed in using the same Apple ID you used to purchase Logic via the App store in the first place.
    If you bought the DVD edition of Logic Studio then you must initially install using those original DVDs to begin with and then update to the latest version of your version of Logic via software updates.
    No DVD drive? Buy an external one.. Amazon do a very cheap basic one that works well..
    or...
    Use Remote Disk if you still have your older Mac which has a built in DVD drive...
    http://support.apple.com/kb/HT5287?viewlocale=en_US&locale=en_US

  • I have a macbook pro core i7 mid 2012 And update to the latest version 10.8.4 system after updating the system I have the problem appeared to take off the device and stops at the apple logo for about 5 minutes and then enters the desktop How can I solve t

    I have a macbook pro core i7 mid 2012
    And update to the latest version 10.8.4 system after updating the system I have the problem appeared to take off the device and stops at the apple logo for about 5 minutes and then enters the desktop How can I solve this problem and thank you

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time when you had the problem. Select the messages logged after the boot, during the time something abnormal was happening. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    For example, if the problem is a slow startup taking three minutes, post the messages timestamped within three minutes after the boot time, not before. Please include the BOOT_TIME message at the beginning of the log extract.
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • I take a .NEF file and a .JPG file with every click. When I transfer the files using a flash drive to another computer I never get all of the files to transfer. I get some of the .NEF and some of the .JPGs but not all

    I take a .NEF file and a .JPG file with every click. When I transfer the files using a flash drive to another computer I never get all of the files to transfer. I get some of the .NEF and some of the .JPGs but not all. How come?

    If you're exporting a project then you'll only get the images in that project. Also if any of the masters are referenced then you won't get those masters unless you check Consolidate masters into exported library
    It might be best if you started from the beginning and explained what it is your are trying to do and how you're going about doing it. Also a description of you're hardware/software setup would be helpful.

  • How do you take out the quarter sized battery inside the computer?

    How do you take out the quarter sized battery inside the computer?

    Hi,
    We do not know your computer therefore can not say how. In general, open the case, locate it (RTC or CMOS battery), disconnect cables (if any) and pull it out.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Is there a way to open Excell file from the server and display in the UI and save it back on to the

    Hello there,
    Is there a way to open Excell file from the server and display in the UI and save it back on to the server? (like showing xell file as a datagrid - add rows, columns etc.)

    Hi Mike,
    Welcome you to the forum.
    You may try:
    SELECT * FROM MyDBNameHere.dbo.OUSR T0
    Thanks,
    Gordon

  • Adding link to the photo and Name in the outlook contact card -Enterprise wide

    How can I make the name and photo in the outlook contact card link to my profile page? I read articles where it is mentoined that the URL is set in Registry, currently my organization does not have any link associated with photo and name in contact card.
    I want to implement this across the organization , any deployment or changes that I need to do to implement this across?
    Appreciate if you can provide details on how this is done. The url will look like this:
    https://www.produrl.com/userid={userid}
    How can I dynamically add respective userid in the link?Appreciate your response on this.

    So you want to redesign the contact card in Outlook? Are you using SharePoint? If signed into sharepoint via the social connect, there is a link to the mysharepoint page under View source. I don't think you can change the link or customize the card,
    beyond what is listed here:
    http://technet.microsoft.com/en-us/library/ff631135(v=office.15).aspx#BKMK_ContactCards
    Diane Poremsky [MVP - Outlook]
    Outlook & Exchange Solutions Center
    Outlook Tips
    Subscribe to Exchange Messaging Outlook weekly newsletter

  • We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is: Cannot send mail. The user name or password for iCloud is incorrect.

    We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is:>> Cannot send mail. The user name or password for iCloud is incorrect.

    About ~20 hours later, this ended up solving itself. We can send email using the '.icloud' email from both the iPad and iPhone.  Advise would be 'wait' before you start seeking alteranatives like yahoo, hotmail, etc.  This definitely is a convenient way to keep all your 'cloud' information in a centralized place, including the common email...

Maybe you are looking for

  • Field Profit Ctr is a required field for G/L account -Posting

    Hello, While posting payroll results to FI , I am facing the following error "Field Profit Ctr is a required field for G/L account " The Field Profit Center is mandatory from FI side,We can  not change it. I assigned the profit center to Org-Unit usi

  • SQL query for timestamp

    I need to query a database from my java program for the time of each entry, but all that's in there is a timestamp. I haven't been able to query it. It was suggested that I convert it to a date in the sql database, but I don't know how to do this. An

  • HT1296 I have accidentally created two iTunes accounts and I clouds.  How do I merge these into one account

    When I closed my mobile me account it appears as if it created two iTunes accounts and two iCloud's. Is there a way to combine the apps and data into a single account.  I want to get this straightened it before I get a new phone.

  • FINDER disappears after trying to set file sharing.  What to do??

    'Finder' dies when I try to use the GET INFO approach and set a folder to be shared. Finder seems to disappear as soon as I place a check mark in the sharing box. It does not even appear in the FORCE QUIT screen. The computer then is in a state of su

  • CTI Integration with IPCC X

    Hello All, We are using IPCC X 4.0.4 with HA. We have a database where we have Employee information which needs to be popped up at the agent screen when the call comes to the agent. We are confused to find the way to do this. Please give us any kind