How to calculate the hours between two dates by the numbers

If I update 09:00 start time 17:00 end time of shift in C3 and B3, how to use a D3 formula to calculate the number of hours between the two?  Then I can just copy down the lines for nth years...

It is a spreadsheet of the part-time staff payroll.

I'm sure that a lot of people out there have done that.

Help, please.

Thank you.

Eddie

What program of worksheet that you are using? Since you have a newer iMac running El Capitan, I can safely assume that you use NOT AppleWorks, which is a Power PC application that can run on any OS newer than the snow leopard, OS X 10.6.8.

If you use numbers, try to repost your question in numbers for Mac forum. If you use Microsoft Excel, try posting in the Microsoft forums. LibreOffice also has community support.

Tags: iWork

Similar Questions

  • Calculate business hours between 2 dates with negative numbers

    Hi all

    I use a function to calculate the difference between 2 dates schedules. The function was taken and adapted from this thread:

    Calculate business hours between two dates in a cursor

    CREATE OR REPLACE
      FUNCTION get_bus_minutes_between(
                                       p_start_date DATE,
                                       p_end_date DATE
                                      )
        RETURN NUMBER
        IS
            v_return NUMBER;
        BEGIN
            with t as (
                       select  case level
                                 when 1 then greatest(p_start_date,trunc(p_start_date) + 9 / 24)
                                 else trunc(p_start_date) + level - 15 / 24
                               end start_dt,
                               case connect_by_isleaf
                                 when 1 then least(p_end_date,trunc(p_end_date) + 20 / 24)
                                 else trunc(p_start_date) + level - 4 / 24
                               end end_dt
                         from  dual
                         connect by level <= trunc(p_end_date) - trunc(p_start_date) + 1
                      )
            select  sum(greatest(end_dt - start_dt,0)) * 24 * 60 work_minutes
              into  v_return
              from  t
              where trunc(start_dt) - trunc(start_dt,'iw') < 5; -- exclude weekends
            RETURN v_return;
        END;
        /

    I am running into an issue that when the p_end_date is before the p_start_date value the function returns the full time between the dates without regard for business hours. if the end_date is before the start date I get the expected result i.e. difference between the dates in business hours.

    Using example dates of start 19th October 2012 13:00:00 and end 22nd october 2012 13:21:00 the business minutes are 681. However if i reverse the dates I get -4341.


    Correct labour code is the following, I've annotated so that he could help someone else looking for a solution like this:

    CREATE OR REPLACE
      FUNCTION get_bus_minutes_between(
                                       p_start_date DATE,  --these are the 2 dates passed into the function
                                       p_end_date DATE     --these are the 2 dates passed into the function
    )
    RETURN NUMBER
    IS
    v_return NUMBER;

            l_start  DATE;

            l_end    DATE;

            l_factor NUMBER;
        BEGIN

            IF p_start_date <= p_end_date THEN            --this IF section checks which of the 2 dates is the greatest

               l_start  := p_start_date;                  -- and then assigns the earliest date to p_start_date

               l_end    := p_end_date;

               l_factor := 1;

            ELSE   -- swap the dates around, and multiply the result by -1

               l_start  := p_end_date;

               l_end    := p_start_date;

               l_factor := -1;

            END IF;

            with t as (
                       select  case level
                                 when 1 then greatest(l_start,trunc(l_start) + 9 / 24)  -- this sets the start of working hours
                                 else trunc(l_start) + level - 15 / 24  --if the start time is adjusted this value must also be adjusted
                               end start_dt,
                               case connect_by_isleaf
                                 when 1 then least(l_end,trunc(l_end) + 20 / 24)  -- this sets the end of working hours
                                 else trunc(l_start) + level - 4 / 24  -- if the end time is adjusted this value must also be adjusted
                               end end_dt
                         from  dual
                         connect by level <= trunc(l_end) - trunc(l_start) + 1
                      )
            select  sum(end_dt - start_dt) * 24 * 60 work_minutes  -- this subtracts the 2 dates and then multiplies by hours and minutes
              into  v_return
              from  t
              where trunc(start_dt) - trunc(start_dt,'iw') < 5; -- this exclude weekends
            RETURN v_return * l_factor;  -- this gives the negative or positive results so you can see if it was completed before or after the required date.
        END;
        /

  • Calculate business hours between two dates in a cursor

    Hello, its me again (?).

    Yesterday, I got a solution to a problem here where I need to calculate the hours between two dates, excluding Sat/Sun and from 09:00 to 18:00. I'm now putting this login in a PL/SQL block, so I can calculate it for each record in a slider, all by looping.
    with t (start_date
           ,end_date
           )
    as (select  to_date('22-oct-2012 09:00:00','dd-mon-yyyy hh24:mi:ss') start_dt,
                           to_date('23-oct-2012 09:00:00','dd-mon-yyyy hh24:mi:ss') end_dt
        from dual
       )
    , hrs (dt) as
      (select start_date
       from   t
       union all
       select dt +1/24/60
       from   hrs
       where  hrs.dt < (select end_date-1/24/60 from t)
      )
    select count(*)/60
    from hrs
    where to_char(dt,'dy') not in ('sat','sun')
    and  to_number(to_char(dt,'hh24')) not between 18 and 23
    and  to_number(to_char(dt,'hh24')) not between 0 and 8
    /
    The logic above, I'm up here:
    FOR c_record IN c_1 LOOP
    //For each record, check if the two dates meet the criteria and then raise the counters accordingly
    select  to_date(c_record.REPORTADA,'dd-mon-yyyy hh24:mi:ss') INTO vFch1 FROM DUAL;
    SELECT  to_date(c_record.INICIOREAL,'dd-mon-yyyy hh24:mi:ss') INTO vFch2 FROM DUAL;
    
    IF ((vHoras > 2) AND c_record.PRIORIDAD=3) THEN
      vContOk :=vContOk + 0;
      vContBad := vContBad+1;
      vContOt   := vContOt+1;
    ELSE 
      vContOk :=vContOk +1;
      vContBad := vContBad+0;
      vContOt   := vContOt+1;
    END
        IF;
    
    IF ((vHoras > 4) AND c_record.PRIORIDAD=2) THEN
      vContOk :=vContOk + 0;
      vContBad := vContBad+1;
      vContOt   := vContOt+1;
    ELSE
      vContOk :=vContOk +1;
      vContBad := vContBad+0;
      vContOt   := vContOt+1;
    END IF;
    
    IF ((vHoras > 16) AND c_record.PRIORIDAD=1) THEN
      vContOk :=vContOk + 0;
      vContBad := vContBad+1;
      vContOt   := vContOt+1;
    ELSE
      vContOk :=vContOk +1;
      vContBad := vContBad+0;
      vContOt   := vContOt+1;
    END IF;
    
    END LOOP;
    I really don't like if the performance is horrible because it will run once a month and should spend only 40-100 records.
    However, I can't find a way to use this connection even in this case

    Could you help me?
    Thank you!

    Greetings,
    NACEUR

    N wrote:
    I need to calculate the number of minutes between two dates, only count the hours from 9 to 18hs.

    CREATE OR REPLACE
      FUNCTION get_bus_minutes_between(
                                       p_start_date DATE,
                                       p_end_date DATE
                                      )
        RETURN NUMBER
        IS
            v_return NUMBER;
        BEGIN
            with t as (
                       select  case level
                                 when 1 then greatest(p_start_date,trunc(p_start_date) + 9 / 24)
                                 else trunc(p_start_date) + level - 15 / 24
                               end start_dt,
                               case connect_by_isleaf
                                 when 1 then least(p_end_date,trunc(p_end_date) + 18 / 24)
                                 else trunc(p_start_date) + level - 8 / 24
                               end end_dt
                         from  dual
                         connect by level <= trunc(p_end_date) - trunc(p_start_date) + 1
                      )
            select  sum(greatest(end_dt - start_dt,0)) * 24 * 60 work_minutes
              into  v_return
              from  t
              where trunc(start_dt) - trunc(start_dt,'iw') < 5; -- exclude weekends
            RETURN v_return;
    END;
    /
    

    For example:

    SQL> select get_bus_minutes_between(
      2                                 to_date('20-oct-2012 13:00:00','dd-mon-yyyy hh24:mi:ss'),
      3                                 to_date('22-oct-2012 13:21:00','dd-mon-yyyy hh24:mi:ss')
      4                                ) work_minutes
      5    from dual
      6  /
    
    WORK_MINUTES
    ------------
             261
    
    SQL> 
    

    SY.

  • How to calculate an interval between two dates?

    Hi all

    I have two dates, and I need to know if the interval between the two is more than 30 days or not. I can't understand how to calculate this interval.
    Could someone help me?
    Thank you very much.

    See the following forumpost:

    Re: Calculation of difference in date in BPEL

    Kind regards

    Melvin

  • Calculate the hours between two dates

    Hello

    I have a requirement to count the hours with 2 given timestamps, something like:
    SQL> select ((to_date('22-oct-2012 13:00:00','dd-mon-yyyy hh24:mi:ss') - to_date('20-oct-2012 13:00:00','dd-mon-yyyy hh24:mi:ss'))*24) B from dual ;
    
             B
    ----------
            48
    However, I wish it would be that simple. I just need to count the hours between two timestamps for the hours of work for example, 08:00 - 17:00, MONDAY to Friday (excluding weekends).
    So lets say I have to count the hours between two dates above the result should be 18 hours not 48 (4 hours on 20/oct, 9 hours on 21/oct to 5 hours 22/oct).
    How can I achieve this? Any idea will be useful.

    Thank you

    My query generates a list of all the hours between the start and end time, filters on the hours that are outside of the hours of work and then account for the remaining lines. Change that to partial hours must just be a case of replace the two occurrences of 1/24 with 24/01/60, then - as say you - Division COUNT (*) by 60.

    There may be performance issues using techniques of generation of line like this, if you put this in a query involving the joining of several lines of other tables (for example where the dates of beginning and end are derived from several employees?) or in several days. If you don't find it then count the number of whole days (taking weekends into account) between dates and work on the partial days after that it could be better. This would probably involve a lot of statements of case (which I don't have time to test it now).

    Ben

  • Excerpt from the hours between two dates

    Hello

    This is the value stored in the table of my database.

    I want to extract betwwen hours two dates. How can I extract it.

    I try to run like this

    Select to_timestamp('27-JAN-14 05.30.00.000000 PM')-to_timestamp('26-JAN-13 08.20.00.000000 PM') double, but it gives the answer as the format 21:10:00.000000000 + 000000365

    I want simple hours, minutes, and seconds

    What is the format of this value as "dd-MON-yy."

    27 JANUARY 14 01.30.00.000000 PM

    26 JANUARY 14 06.22.32.170033 PM

    Use the Extract function. Like this.

    () AS T1 (C1)

    Select to_timestamp('27-JAN-14 05.30.00.000000 PM')-to_timestamp('26-JAN-13 08.20.00.000000 PM') of double)

    SELECT EXTRACT (DAY OF C1) | ' DAYS '.

    EXTRACT (HOUR OF C1) | ' HOURS '.

    EXTRACT (MINUTE OF C1) | ' MINUTES '.

    EXTRACT (SECOND C1) | ' SECONDS

    FROM T1;

    OUTPUT:

    365 DAYS 21 HOURS 10 MINUTES 0 SECONDS

    If not try it.

    SELECT EXTRACT (DAY OF to_timestamp('27-JAN-14 05.30.00.000000 PM')-to_timestamp('26-JAN-13 08.20.00.000000 PM')) | ' DAYS '.

    EXTRACT (HOUR FROM to_timestamp('27-JAN-14 05.30.00.000000 PM')-to_timestamp('26-JAN-13 08.20.00.000000 PM')) | ' HOURS '.

    EXTRACT (to_timestamp('27-JAN-14 05.30.00.000000 PM')-to_timestamp('26-JAN-13 08.20.00.000000 PM') MINUTE) | ' MINUTES '.

    EXCERPT ((SECOND from to_timestamp('27-JAN-14 05.30.00.000000 PM')-to_timestamp('26-JAN-13 08.20.00.000000 PM')) |) ' SECONDS

    DOUBLE;

    Post edited by: Parth272025

  • Figure out how many years and days between two dates

    Nice day

    I've been dealing with the problem for a few days now so I thought that I could send it and see if someone can tell me what I'm doing wrong.

    / * Create a Date with a date object. */

    var d1 = getField "(RELEASE. DATE') .value;

    / * Create a date object containing the current date. */

    var d2 = getField("Text4").value;

    / * Number of years difference. */

    diff = (((d2.valueOf () - d1.valueOf (()) / 1000) / 60) / 60) / 24) / 365;

    Displays the field "Text3".

    getField("Text3").value = (diff); & #8232;
    < END >

    RELEASE. Value DATE is January 1, 2011, with a date format dd/mmm/yyyy

    Text4 value is March 1, 2011 with a date format dd/mmm/yyyy

    The release of Text3 gives me a 'NaN' result

    What I'm trying to do is calculated the number of years an employee has had with the company, and then display a balance of days that he had.

    Any thoughts would be greatly appreciated.

    repeated conversion from date string and number of days for the reuse of code
    function Date2Num (cFormat, cDate) {}
    Converts a date string formatted in days since the date of the time
    Kai var = util.scand (cFormat, cDate);
    Math.floor (oDate.getTime (return) / (1000 * 60 * 60 * 24));
    }

    / * Create a Date with a date object. */
    var d1 = (getField("Enrol_Day").value + "/" + getField("EnrolMonth").value + "/" + getField("EnrolYear").value);
    Converts a date in the date object string
    oD1 var = util.scand ("dd/mmm/yyyy", d1);
    get the current date of the field
    var d2 = (getField ("TD. RelDay") .value + ' / ' + getField ("TD. RelMonth") .value + ' / ' + getField ("TD. (RelYear') .value);

    calculate the difference in days
    diff var = Date2Num ("dd/mmm/yyyy", d2) - Date2Num ("dd/mmm/yyyy", d1);
    increment the value if the end date should be included in the calculation
    diff ++;
    convert days to truncate all years - to the next intiger lowest
    var carnavalSVP = Math.floor(diff / 365.25);
    get the current year interval - rest of diff days divided by 365.25 days
    var nDays = Math.floor (diff % 365.25);

    display the entered values
    CMSG var = ' end date: "+ d2 +" \t Compute days: ' "+ Date2Num (" dd/mmm/yyyy", d2);
    CMSG += "\nStart date:" + d1 + "\t Compute days: '" + Date2Num ("dd/mmm/yyyy", d1);
    Total difference in days
    CMSG += "\nTotal elapsed days:"+ diff;»
    result in years and days
    CMSG += "\nYears:" + carnavalSVP + "and" + nDays + 'days'; "."
    App.Alert (GSMC, 1, 0, "results");
    //

  • Hours between two dates

    Hi friends,

    I use the Oracle 10 g server.

    Can someone help me find hours of day remained wise room_no.

    create the table ROOM_OCCUPIED

    (

    PERSON_NAME VARCHAR2 (10),

    ROOM_NO VARCHAR2 (5).

    DATE OF CHECK_IN,

    DATE OF CHECK_OUT

    )

    insert into ROOM_OCCUPIED (ROOM_NO, CHECK_IN, PERSON_NAME, CHECK_OUT)

    values ('JB', ' 20', to_date (March 5, 2015 19:00 ',' dd-mm-yyyy hh24:mi:ss'), to_date (May 5, 2015 12:00 ',' dd-mm-yyyy hh24:mi:ss'));))

    insert into ROOM_OCCUPIED (ROOM_NO, CHECK_IN, PERSON_NAME, CHECK_OUT)

    values ('CHRISTOPER', ' 15', to_date (January 5, 2015 09:00 ',' dd-mm-yyyy hh24:mi:ss'), to_date (5 March 2015 10:00 ',' dd-mm-yyyy hh24:mi:ss'));))

    insert into ROOM_OCCUPIED (ROOM_NO, CHECK_IN, PERSON_NAME, CHECK_OUT)

    values ('BIBI', '35', to_date (May 5, 2015 13:10 ',' dd-mm-yyyy hh24:mi:ss'), null);

    insert into ROOM_OCCUPIED (ROOM_NO, CHECK_IN, PERSON_NAME, CHECK_OUT)

    values ('DEV', ' 20', to_date (5 March 2015 01:00 ',' dd-mm-yyyy hh24:mi:ss'), to_date (5 March 2015 05:00 ',' dd-mm-yyyy hh24:mi:ss'));))

    Select t.*, (Nvl (t.check_out, Sysdate) - t.check_in) * 24 Hrs

    of room_occupied t

    ORDER BY 2

    PERSON_NAME ROOM_NO CHECK_IN CHECK_OUT TOT_HRS_STAYED

    CHRISTOPER 15 5/1/2015 09:00 03/05/2015 10:00 49

    20 H 5/3/2015 19:00 05/05/2015 12:00 41

    DEV 20 5/3/2015 01:00 03/05/2015 05:00 4

    BIBI 35 5/5/2015 13:10 10.66888889

    I need output like below a day format

    Name of person room occupied_dt Hrs_stayed

    Christoper 15 24 05/01/2015

    Christoper 15 05/02/2015 24 hours

    Christoper 15 9hrs 05/03/2015

    - - - - - - - - -

    - - - - - - - - -

    - - - - - - - - -

    I run every day to Watch report

    Rgds,

    RDK

    Hi Rdk,

    Here is my path. I'm counting minutes and then round up to hours for a day of occupation. To get the hours for those who are not yet extracted, I used check_out nvl (checked_out, sysdate). If not wanted then just delete expression nvl .

    alter session set nls_date_format='dd-mm-yyyy'
    ;
    with occupation_minutes (person_name, room_no, check_in, check_out, occupied_dt, minutes) as (
      select
        person_name,
        room_no,
        check_in,
        nvl(check_out, sysdate) check_out,
        trunc(check_in) occupied_dt,
        1 minutes
      from room_occupied
      union all
      select
        person_name,
        room_no,
        check_in,
        check_out,
        trunc(check_in + minutes / 1440),
        minutes + 1
      from occupation_minutes
      where minutes < (check_out - check_in) * 1440
    )
    select
      person_name,
      room_no,
      occupied_dt,
      round(count(minutes) / 60) || 'hrs' Hrs_stayed
    from occupation_minutes
    group by
      person_name,
      room_no,
      occupied_dt
    order by
      person_name,
      occupied_dt
    ;
    
    session SET altered.
    PERSON_NAME ROOM_NO OCCUPIED_DT HRS_STAYED
    ----------- ------- ----------- -------------------------------------------
    BIBI        35      05-05-2015  11hrs
    BIBI        35      06-05-2015  8hrs
    CHRISTOPER  15      01-05-2015  15hrs
    CHRISTOPER  15      02-05-2015  24hrs
    CHRISTOPER  15      03-05-2015  10hrs
    DEV         20      03-05-2015  4hrs
    SIDHIQ      20      03-05-2015  5hrs
    SIDHIQ      20      04-05-2015  24hrs
    SIDHIQ      20      05-05-2015  12hrs                                     
    
    9 rows selected
    
  • Calculate elapsed hours between two time fields

    I have a form with fields TimeStart and TimeEnd. Both are formatted as field time in the format hh: mm tt. I also have a field called hours with the number format. Here is the Javascript code that I have in the section calculation Script custom field hours. Could someone tell me why it doesn't work? This script started as a date calculation script (work), and I changed to the calculation of hours instead of days.

    var strStart = this.getField("TimeStart").value;

    var strEnd = this.getField("TimeEnd").value;

    If (strStart.length & & strEnd.length)

    {

    var timeStart = util.scand ("h: mm tt", strStart);

    var timeEnd = util.scand ("h: mm tt", strEnd);

    diff var = timeEnd.getTime () - timeStart.getTime ();

    var hour = 60 * 60 * 1000;

    var h = Math.floor (diff/oneHour);

    Event.Value = hours;

    }

    of another event.value = 0;

    The order for the calculation of the fields is wrong, you need to update.

  • Calculate the difference in days between two Dates

    Hello

    I'm trying to understand how to calculate the difference in days between two dates using JavaScript in LiveCycle. (Minimum = JavaScript knowledge)

    Where 'Start_Date' and 'Current_Date' are the names of the two dates in the palette of the hierarchy. (the two Date/time field)

    * Current date is using the object > value > execution property > current Date/time

    I need a text or number field showing the difference in days. (Difference_in_Days)

    I noticed the following code is pretty standard among other responses:

    var

    Start_date = new Date (Start_Date);

    var

    Current_Date = new Date (Current_Date);

    var

    nAgeMilliseconds = Current_Date.getTime) - Start_date.getTime ();

    var

    nMilliSecondsPerYear = 365 * 24 * 60 * 60 * 1000 ;

    I know there is lack of code and code above are may not be not correct.

    Please notify.

    OK, that's because of the way that javascript and works of the calculate event.  The field will be filled with whatever the script resolves at the end of execution. Technically, your script does not have a value because the last thing you do is an assignment to a variable.  Change the last line as follows:

    Math.ABS ((firstDate.getTime)

    ((- secondDate.getTime (()) / (oneDay));

    (eliminate the variable assignment) and get rid of the app.alert.  Your script will "return" (have) regardless of the value of calculation from the East and which will be stored in the field.

  • How to calculate the number of days/weeks/months between 2 dates?

    Hello

    I would like to know how to calculate the number of days/weeks/months between 2 dates in OBIEE 11 g, for example, I have 26/05/2013 and 19/05/2013, then I want to get 7 days.

    Thank you!
    Jamie

    Hi Jamie,

    Through this links...

    http://www.bravesoft.com/blog/?p=682
    http://twobiee.blogspot.in/2012/01/working-with-date-differences.html

    Mark as correct it allows u...
    Thank you...

  • Calculate the (age) years between two dates

    Nice day!

    I have not been able to find an answer, that I was able to use in the archives or online and would be very grateful for the help.  I'm working with Adobe Acrobat Pro XI (not LiveCycle) and I have very little experience with programming (for the most part, copy / paste).

    I need to create a text box that calculates the number of years between two dates entered, i.e. the age when the date of birth and death are given.  Also, would be nice if she was a Virgin until the two were provided.  Anyone would be able to give me the code I need to put in the custom calculation script?

    Once again, any help would be much appreciated!  Thank you and have a wonderful day!

    For the fields for Date of birth DOB and DOD for the Date of death and age in complete years both by using a'd-mmm-yyyy' date format you can use a custom calculation to the JavaScript for the field of age as:

    function GetField (cName) {}
    get the field with error trapping object;
    oField var = this.getField (cName);
    test error;
    if(oField == null) app.alert ("error during the" + cName, 1, 0);
    Returns the field object;
    return oField;
    } / / end GetField function;

    function {Scand (cFormat, cString)
    using date string format convert object date;
    convert string to date using format;
    Kai var = util.scand (cFormat, cString);
    the value null is an error of conversion;
    if(oDate == null) app.alert ("Conversion error" cString "by using the format" + cFormat, 1, 0);
    date of return;
    Return to oDate;
    } / / end Scand function;

    clear the value of the field;

    Event.Value ="";
    get data dob and dod;
    var oDOB = GetField ("DOB");
    Var o = GetField ("DOD");

    treat only if DOB and DOD have value and are not null;
    If (oDOB! = null & o! = null & oDOB.value! = "" & oDOD.value!) = "") {}

    convert the DOB and DOD to date objects.
    oDOB var = util.scand ("d-mmm-yyyy", oDOB.value);
    O var = util.scand ("d-mmm-yyyy", oDOD.value);

    get the difference over the years;
    var Age = oDOD.getFullYear () - oDOB.getFullYear ();

    adjust for month of previous DOD DOB;
    If (oDOD.GetMonth)< odob.getmonth())="">

    adjust the DOD before DOB date in the month of birth;

    If (oDOD.GetMonth () == oDOB.getMonth () & oDOD.getDate ())< odob.getdate())="">
    Set the value of the field;

    Event.Value = Age;
    }

  • How can I determine if the current date is between two dates?

    I'm trying to post a link when grave the current date between two dates. I have setup the startdate and the enddate. When he falls between the startdate one date enddate, the link will be apear. The startdate and enddate have already been formatted previously, as mm/dd/yyyyy. I tried to use the following script, nothing will do. What I am doing wrong?

    < cfif startDate GTE #dateformat (now (), "MM/DD/YYYY") # AND enddate LTE #dateformat (now (), ' MM/DD/YYYY') # >

    Don't know what you're talking about. I used the #dateformat(date_entered, 'mm/dd/yyyy') # for years without problem. I googled the datediff function before posting here and what I've found is datediff determines the whole number of units by which date1 is less than date2. I don't know how this can help me.

  • How to get the date between two dates, except Saturday and Sunday

    Dear all,
    select to_date('25-04-2012', 'DD-MM-YYYY') + rownum -1 dt 
        from dual 
        connect by level <= to_date('05-05-2012', 'DD-MM-YYYY') - to_date('25-04-2012', 'DD-MM-YYYY') + 1;
    The query above returns the following output
    DT
    DT
    04/25/2012
    04/26/2012
    04/27/2012
    04/28/2012
    04/29/2012
    04/30/2012
    05/01/2012
    05/02/2012
    05/03/2012
    05/04/2012
    05/05/2012
    Here, I need to exclude Dates that lights up "Saturday" and "Sunday" and also the joint birthday party
    Here it is May 1, 2012 "and I need the output as follows,
    04/25/2012
    04/26/2012
    04/27/2012
    04/30/2012
    05/02/2012
    05/03/2012
    05/04/2012
    I need the current request to calculate between two dates.
    Can anyone suggest me?

    Thank you
    Regsrds,
    gurujothi
    select dt
    from(
        select to_date('25-04-2012', 'DD-MM-YYYY') + rownum -1 dt
            from dual
            connect by level <= to_date('05-05-2012', 'DD-MM-YYYY') - to_date('25-04-2012', 'DD-MM-YYYY') + 1
            )
    where to_char(dt,'fmday') not in ('sunday','saturday')  
    

    To exclude, common holiday, you must have a host table. Then use an OUTER JOIN NOT IN or NOT EXISTS

  • Calculate the number of days between two dates

    Hello

    Can someone help please change my formcalc script to calculate the number of working days between two date fields.  My script currently calculates the total number of days between two dates, including the weekends which must be excluded from the total.

    If

    (HasValue (Start_Date1) & HasValue (End_Date1)) then

    $

    = Date2Num (End_Date1, "YYYY-MM-DD" "en_IE") - Date2Num (Start_Date1, "YYYY-MM-DD" "en_IE") + 1

    on the other

    ""

    endif

    Any help will be most appreciated.

    Thank you.

    Check...

    (1) you said that you put the script on the event «days1» calculate My sample imitates the variable names used in the original message, "Start_Date1" and "End_Date1". If the names of variables for the start and end dates are different, you will need to modify the script to account for these names.

    (2) the Date2Num functions in the calculation of the "totalDays" use the date format "YYYY-MM-DD". If your date habits differ from "YYYY-MM-DD" FormCalc will complain.

    Steve

Maybe you are looking for

  • some play some YouTube videos have I not 2013 macbook pro

    My macbook pro is up-to-date with 0sx el capitan 4gigs I'm unable to watch videos on youtube.  They just say error and not load.  YouTube said its my browser, but its update.  If this were true, then why do some play and some do not.

  • Apple and AT &amp; T SIM

    Can subscribe to an AT & T plan my card SIM Apple, I later cancel the AT & T plan and sign up with another carrier SIM Apple?  Or is my apple SIM to always dedicated to AT & T?

  • Connecting several HorizontalFieldManager

    Hello I created a table using several HorizontalFieldManager that I put below the other. Problem is that the current line moving when I scrool horizontally but (obviously) not the rest of the table. So it messes up the display. Do you know how I coul

  • create the dual boot with an external hard drive

    I want to create dual boot laptop (OS 2 in 1) in my laptop, but my internal hard drive reach maximum (3) logical partition for my windows operating system 7 is not allow me to create a new logical partition install win8 pro. I've planed to buy an ext

  • Error Code 800703EB

    I am trying to install an update so that I can use my printer/fax/scanner HP Officejet 6210 All - in-One andWindows Update doesn't install any and I get the above error code. My OS is Windows 7 Ultimate.Help, please.