recent completion date of the year

I have an Assembly date someone who is 20 October 2008.

the person of this Assembly date now full years on 20-OCT-2009,20-OCT-2010,20-OCT-2011 till now.

I want to select the maximum date of end of the year, which should be less then sysdate, and this date is October 20, 2011.

What will be the command to select that date in 9i?

Simply apply a max function for the result set:
------

WITH t AS
        (    SELECT ADD_MONTHS (TO_DATE ('20-OCT-2008', 'DD-MON-YYYY'),
                                ROWNUM * 12)
                       dt
               FROM DUAL
         CONNECT BY ROWNUM <=
                       TO_CHAR (SYSDATE, 'YYYY')
                       - TO_CHAR (TO_DATE ('20-OCT-2008', 'DD-MON-YYYY'),
                                  'YYYY')
                       - 1)
SELECT MAX (dt) dt
  FROM t;

output:

dt
----
10/20/2011

See you soon,.
Manik

Tags: Database

Similar Questions

  • To get the last date of the year

    Can someone tell me how to get the date of the year from the first date of last year:
    My query below gives the last date of the month

    SELECT LAST_DAY (ADD_MONTHS (TO_DATE (JANUARY 1, 2012 "," DD/MM/YYYY '), 12-))
    TO_NUMBER (to_char (sysdate, 'mm'))) OF the DOUBLE

    Thnx in advance
    SELECT LAST_DAY (ADD_MONTHS (TO_DATE ('01/01/2012', 'DD/MM/YYYY'), 11))
      FROM DUAL
    
  • Update of the completion Date and the Date of booking

    I have a question regarding completion dates and the dates of reservation.

    If we have an online class that the learner is part of 01/01/2011 and ends on 01/01/2011.

    The user then goes back on 01/07/2011 and follows the course again that it does not refresh the completion date.

    If a new class is created under the same courses and the same offering and the user is part of the new class it auto fills the date of completion of the previous registration.

    How do some work around that?

    Thank you!

    Hi Mike,.

    For online courses that are not certifications, the completion date is still on the first date that the user completed the course. Once it's done, it's done, no matter how many times the user going in and going through the content again. You might look attempt data if necessary to see all attempts of the user and the State of each such attempt is "gross" as described by the content.

    What problem are you trying to solve?

    Scott
    http://www.seertechsolutions.com

  • How to find the next date of the year and day as of today's date and the day

    I have a question about date functions, that is to say: how to get one next year (date and day) like today are the date and the day this year?

    You mean like this?

    SQL > select to_char (add_months (sysdate, 12),' day DD/MM/YYYY ') twice;

    TO_CHAR (ADD_MONTHS (S
    --------------------
    Friday, August 22, 2014

  • To find the last year data / data of the year an individual

    Hello

    How to find the data for the whole of last year, I tried like

    entered_date between to_char (December 31, 2008 11:59:59 ', ' HH12:MI:SS MM/DD/YYYY ')
    and to_char (1 January 2010 00:00:00 ',' DD/MM/YYYY HH12:MI:SS'), but it's an error invalid number.

    Thank you.

    Hello

    If you want something that doesn't require you to hardcode a year, but the numbers automatically in what year it is:

    WHERE   entered_date     >= ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
                                              , -24
                                    )
    AND     entered_date     <  ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
                                              , -12
                                    )
    

    There are a couple of things to notice on the expression that you posted (in addition to using TO_CHAR TO_DATE instead):

    WHERE  entered_date     BETWEEN TO_DATE ('12/31/2008 11:59:59', 'MM/DD/YYYY HH12:MI:SS')
                          AND       TO_DATE ('01/01/2010 00:00:00', 'MM/DD/YYYY HH12:MI:SS')
    

    BETWEEN includes two end points, so the phrase above covers just a little over a year. It includes a second of 2008 and a second in 2010, as well as the whole of 2009.

    Currently, 2010 is the last year, so the expression you have posted (as well as my suggestion) is actually for the year before last year, but it can easily be changed for the whole year.

  • Impossible to get more recent calendar data on the phone...

    Hello, I just recently upgraded a 5s of the SE.  (Yes, I'm that luddite who refuses to get a big phone.) My Contacts were pulled down from the cloud, but my calendar does not. He got rather pulled down on my Macbook. How can I retrieve the data down to my iPhone?

    Settings > iCloud > calendars = 'On '.

  • difference between two dates in the year/month/day in Obiee

    Hi gurus,

    I know this question have been asked and answered several times but I have a requirement that is a little different, then the previous ones.

    I want to calculate the difference between two dates in OBIEE10g in year/month/day format similar to the below SQL output

    SQL > select end_date, start_date,

    trunc (months_between (end_date, start_date) / 12) years.

    months of mod (trunc (months_between (end_date, start_date)), 12).

    End_date - add_months (start_date, trunc (months_between (end_date, start_date))) days

    t

    Thanks in advance

    SK

    Search for this

    "TIMESTAMPDIFF IN THE FORM OF MTHS # YEARS."

    or else

    To get the current mandate of employees since the date of hiring in the form of # years # mths or # year (s) # month (s)

    Concat (concat (cast (TIMESTAMPDIFF (SQL_TSI_Month, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) / 12 as char),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Month (s)'))

    Concat (concat (CAST (TIMESTAMPDIFF (SQL_TSI_YEAR, "Employee attributes". (((' ' Hiring last Date employee ", CURRENT_DATE) as CHAR),"Year (s)"), concat (cast (MOD (TIMESTAMPDIFF (SQL_TSI_Month,"Employee attributes". (((((' ' Hiring last Date employee ", CURRENT_DATE), 12) as char), 'Mth (s)'))

  • Calculation based on the date, but the year &amp; month on fileds separate.

    Hello
    Simple question:
    I have a table with the SOURCE fields 9i, YEAR, MONTH
    Because I don't have a date field, how I count for example records < 07/2008?

    SAMPLE DATA:
    .
    .
    .
    APPLES; 2008; 06
    APPLES; 2008; 07
    APPLES; 2008; 08
    .
    .
    .

    Thanks in advance for your help.

    Hello
    do you want this?

    with data
    as
    (select 'APPLES' SOURCE ,'2008' yy,'06' mm from dual union all
     select 'APPLES'  ,'2008' ,'07'  from dual union all
     select 'APPLES'  ,'2008' ,'08'  from dual)
    select count(*)
    from data
    where to_date(yy||mm,'YYYYMM') <= to_date('072008','MMYYYY')
    
  • ETL has no load data of the year: 2011. He stopped until 2010.

    I have a doubt with my E-T-L, which took place. I gave "Initial retrieval Date" as January 1, 2008. I had all the data of January 1, 2008, to January 1, 2010. My Question is why have I not given to 2011? Given that the current date is September 14 and I have ETL today only on a new system. What setting should I set up to ensure that it takes all the data to date.

    Thank you for your help

    Have you checked to make sure that the owner of the tasks that have this parameter value is custom... container and NOT the original container (for example OracleR12).

    Check this post I wrote previously: Re: problems with extension tables budget day/W_DAY_D

    It can help. If this helped... Please check the correct or helpful answer.

  • Date function to push the dates of the year?

    is there a built in function to return all dates (regardless of format) between dates?

    Example:

    Select nomfonction (' 2009/06/01 ', ' yyyy/mm/dd), (' 2009/06/05 ', ' yyyy/mm/dd')
    of the double

    Results sought
    02/06/2009
    03/06/2009
    04/06/2009
    select  to_char(to_date('2009/06/01', 'yyyy/mm/dd') + level - 1,'yyyy/mm/dd')
      from dual connect by level <= to_date('2009/06/05', 'yyyy/mm/dd') - to_date('2009/06/01','yyyy/mm/dd') + 1
    /
    
    TO_CHAR(TO
    ----------
    2009/06/01
    2009/06/02
    2009/06/03
    2009/06/04
    2009/06/05
    
    SQL> 
    

    SY.

  • Sort by date does not account for the year

    When I sort the files by modification date he considers only the month and date. The year is ignored, causing very old files appear on the top, for example

    2007-12-14

    02/10/2010

    2008-09-30

    01/05/2009

    Are you in the files by computer / disk / folder or you use a shortcut to get the file?  Shortcuts sometimes do not function correctly, but it generally works very well if you sort starting with the link to the computer (I have just last week took a thread with the same question, and that is the resolution).

    Click the down arrow next to the update and then click on the Group and it will sort chronologically in groups: maybe the option will work.  Painful modified Date works fine on my system, first for files separately and then for files separately.

    I hope that this workaround works for you.  Otherwise (or you do not like the solution even if it works), after return and we will make a troubleshooting complete diagnosis to try to identify the problem and solve it.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Do not find data on the server of Web pages, but do developing PC localserver

    My website access data OK on my localserver, but once I download on my server online, it cannot be found. It is there because I can access it via my ISP software.

    The error I get is - the website has encountered an error during recovery http://Bega.org.UK/gateway/graveyard/public/data/view_graves_date.php . It is perhaps out of service for maintenance or configured incorrectly.

    (The rsobj code file and php php is installed in my HTML files by WebAssist Server Assistant)


    By trial and error I found (I think) that the problem is the code on my web page

    <? php require_once('.. /.. /.. /.. / Connections/Graveyard.php');? >

    <? php require_once('.. /.. /.. /.. / webassist/mysqli/rsobj.php');? >

    <? PHP

    $rsGraveyard = new WA_MySQLi_RS("rsGraveyard",$Graveyard,0);

    $rsGraveyard-> setQuery ("SELECT * FROM gravestones ORDER BY grave_funeral_yyyy DESC");

    $rsGraveyard-> execute();

    ? >

    <! doctype html >

    < html >

    < head >

    .......

    .......

    Once again, by a process of trial and error, I think the connections file graveyard.php there is an error in the path or a case issue between graveyard.php and Graveyard.php.

    The connections file is

    <? PHP

    # FileName = "WADYN_MYSQLI_CONN.htm"

    # Type = 'MYSQL '.

    # HTTP = 'true '.

    $hostname_Graveyard = "localhost";

    $database_Graveyard = "cemetery."

    $username_Graveyard = ' * ';

    $password_Graveyard = ' * ';

    @session_start ();

    $Graveyard = new mysqli ($hostname_Graveyard, $username_Graveyard, $password_Graveyard, $database_Graveyard);

    ? >


    I'd appreciate any help on this. Try to understand me he kept me entertained all weekend.

    I looked again, and that's what I found.

    My first site was based on the original David tutorial "build your first dynamic web site. I was advised by Nancy O when DW CC dropped behaviors side server using WebAssist ones. The code mentioned earlier in this thread has been inserted in the file by WebAssist server behaviors.

    I didn't like my first site so I made a cosmetic redesign, but kept the dynamic code on the site first - it worked. Still doesn't work.

    The new site has been working properly until a week or two ago but then, for some inexplicable reason, he stopped allowing me to add or edit records. Now I can view and the list of records, as described in the tutorial of David but not add or change. This problem applies to all three databases.

    Although I saw no difference in code between the old and new files (apart from the cosmetic things) I tried to copy the code of the dynamic action from the work to those inactive files but it does not work in the new files.

    So the problem must lie elsewhere. The files in the folder connections are all correct (same as the old site) and as I said I can list all of the records and discovered the complete data of the selected, both paths to the files, and the user name, passwords and the information contained in the files in the folder of connection should be OK.

    So, what's the problem? Where should I look? I'm getting pretty desperate scrap ot batch and leave. As a great need to exercise for me probably not quite a waste of learning time, but it's frustrating.

  • Values written with if &amp; if else for the year

    Hi all

    I am facing a problem with the below mentioned script. Please suggest where I am wrong of personal watercraft

    When I select yest 2010 is working well. But when I enter the data for the year 2011. It's even more written year 2010 "on data of Budget Total.

    Once again, when I erase the data and run new rule shows correct figures. I'm confused, so to get the rule, I need to release twice and run three times in the planning of the data forms.

    I have attached the rules in the planning of the data forms.

    DIFFICULTY (Jan:Dec,"Budget","initial",@DESCENDANTS ('entity', 0), @CHILDREN("New Employees") TBH1:TBH30)

    ('Total employee Budget'
    IF (("Year" == FY10))
    'Total employee Budget' = ("Base salary" + "The additional allocation" + "Social allowance" and "Children's allowances" + "equivalency") * 12.
    ElseIf (("Year" == FY11))
    'Total employee Budget' = ("Base salary" + "Additional Allowancel" + "Social allowance" and "Children's allowances" + "equivalency") * 3;
    ENDIF)
    ENDFIX;




    Concerning
    Krishna

    Two ways to achieve this:

    FIX(Jan:Dec,"Budget","initial",@DESCENDANTS ("Entity",0),@CHILDREN("New Employees") TBH1:TBH30)
    
    "Total Employee Budget"(
    IF (@ISMBR("FY10") )
    "Total Employee Budget"=("Basic Salary""Supplementary Allowance l""Social Allowance""Children Allowance""Pension")*12;
    Elseif(@ISMBR("FY11"))
    "Total Employee Budget"=("Basic Salary""Supplementary Allowancel""Social Allowance""Children Allowance""Pension")*3;
    ENDIF)
    ENDFIX;
    

    or

    FIX(Jan:Dec,"Budget","initial",@DESCENDANTS ("Entity",0),@CHILDREN("New Employees") TBH1:TBH30)
    FIX("FY10")
    "Total Employee Budget"(
    "Total Employee Budget"=("Basic Salary""Supplementary Allowance l""Social Allowance""Children Allowance""Pension")*12;
    )
    ENDFIX
    FIX("FY11")
    "Total Employee Budget"(
    "Total Employee Budget"=("Basic Salary""Supplementary Allowancel""Social Allowance""Children Allowance""Pension")*3;
    )
    ENDFIX
    

    I would go for the first, because it's only a single pass through the data.

    Kind regards

    Cameron Lackpour

  • Devices to OBIEE (highlighting the data in the report)

    Hi all


    I'm basically a guy of Business Objects. I have a doubt, BO that we have only one option like "Devices" to highlight data.


    Ex: If suppose I want to display the data for the year 2009 in red color and data for 2008 in yellow in this case we will use devices in BO.


    Is there an option like this in OBIEE. Please someone help me.


    Thanks in advance
    REDA

    Hi reda,.

    You can use conditional formaating in OBIEE to highlight.

    Kind regards
    Swati

  • RN4220 and the FOURTH all losses of data for TWO years

    Hello team NTGR and customers.

    I want to tell you a failstory.

    Two years ago, I was looking for a BIG SIN store backups of my data from the company.

    I have already had several old Pro RND 6 boxes and selected 4220 x 12 4 hard drives of WD RE CT.

    price was 10 k $ without hard drives.

    only since the beginning, I faced OS6 RND and problems. You can read about it here

    https://community.NETGEAR.com/T5/ReadyNAS-in-business/this-is-not-enterprise-devices-5-months-of-sup...

    (topic has been pruned don't know why).

    and here

    https://community.NETGEAR.com/T5/ReadyNAS-in-business/MPIO-slow-speed/TD-p/964959

    and now I've lost my data once more. the FOURTH TIME! EACH MONTH I LOSE ALL MY DATA.

    slapping admin page and no SMB/iSCSI access to all my 25 TB of data.

    It's lost, complete and 100% lost.

    hate you, NETGEAR.

    do something crazy House and nothing more.

    I obliged thanks NTGR for help - this time was not data loss and only three days spent to solve the problem.

Maybe you are looking for

  • DefaultFontFallbacks.plist cannot change in El Capitan

    Hello I tried to change the /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.fr amework/Resources/DefaultFontFallbacks.plistso I have my own substitution fonts to see Myanmar police in viber.  But can not change due to app

  • Why external software can not find my pictures on the Photos?

    I tried to create a photo album with a Web site, I've used for a long time. I download the photos and then work on their interface. He has worked well with iPhoto. But now with the Photo, the download system can not find the photos. It shows nothing,

  • Rapporteur of bugs is dimmed, unavailable.

    The option to defer bug in developer options is gray, and the shortcut to the current menu option. There is no way to use the Rapporteur of bugs on board.

  • System repair of Windows XP Embedded without the help of his CDs?

    I use a CCTV using the Windows XP Embedded platform. Recently, due to some problems, I'm not able to boot the system and that's what suggests to repair windows using the CD because of the missing "C:\WINDOWS\SYSTEM32\CONFIG\SYSTEM" file I have lost m

  • Iexplore.exe memory could not be "written".

    Cleaned of malware, lost adobe flashplayer.  Whenever I try to install adobe flashplayer or access a Web page with flashplayer used I get the above message and have completed the program.