How do I calculate age (in numbers)

... just switched to Numbers, used to Excel...
I suspect it's got to do with Data Formats...
Please help!

I would direct you to existing thread on the subject.
https://discussions.apple.com/thread/1380192

Similar Messages

  • How do I calculate hours in Numbers?

    How do I calculate hours in Numbers? Example: I inserts 7:00 in a cell and 11:30 in another cell. What function do I write to get 4:30?

    Hi Interlaga,
    Enter start time in A2. Enter finish time in B2. They will become Cell > Data Format > Automatic with Date and Time (Date None).
    Formula in C2
    =B2−A2
    That becomes Cell > Data Format  >Automatic
    Refinement is to use 'Date and Time' Format for start and finish, and 'Duration' format for the difference.
    Remember that in Numbers, every Date has a Time attached, and every Time has a Date attached (even if they are not displayed in the cell). So if you enter the times on different days (the 'crossing midnight' problem) the finish time will be 24 hours later .
    It took me a while to understand this, but a Time or a Date is an instant since 1 January 1904.
    Call back for more help.
    Regards,
    Ian.

  • How do I calculate age?

    Hi again!
    I would like to calculate a registered users age using the
    date of birth inputted by the user. I want to display this age on
    the profile page of the user.
    Does anyone know of an easy way to do this?

    If dateOfBirth is the variable with their date of birth in
    then as follows:-
    <cfset age = dateDiff("yyyy", dateOfBirth,
    now())>

  • How can I calculate the Prime Numbers  ?

    Hi everyone ,
    I want to learn how can I do this :
    Write a Pl/SQL program using While loop , which will accept integer from 1 to 50 and generate the prime numbers as showen in the following output :
    The prime numbers from 1 to 50 are as follows :
    1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47

    HanyFreedom is one of the oracle's teachers that I have asked him yesterday about this Question .. I just know him via the internet ..
    now,
    I'm keep trying to find out what is the right answer..
    and this is my try :
    Declare
    counter number(10):=1;
    j number (4);
    begin
    DBMS_output.put_line('The prime numbers from 1 to 50 are as follows ');
    while counter < 50 loop
    FOR j in 2..50 loop
    if mod(counter,1)=0 and mod (counter,j)<>0 and mod(counter,2)<>0
    then
    dbms_output.put_line(counter);
    end if;
    counter:=counter+1;
    end loop;
    end loop;
    end;
    but there is something error because in the result i get number 49 which is not right
    Message was edited by:
    user635582

  • How to calculate age in SQL?

    I have a table with DATE as one of the column.
    How do I calculate age?
    Thanks in advance
    -Shilpa

    michaels2 wrote:
    TryWell it still leaves leap year question open. If person was born on February 29, how old is that person on February 28 of a non-leap year? Your code considers it imcomplete year:
    SQL> var dob varchar2(20)
    SQL> exec :dob := '19960229';
    PL/SQL procedure successfully completed.
    SQL> select trunc ( (to_number (to_char (to_date('20090228','yyyymmdd'), 'yyyymmdd'))
      2                  - to_number (to_char(to_date(:dob, 'yyyymmdd'),'yyyymmdd'))
      3                  )
      4                / 10000)
      5            as "Age of Child"
      6    from dual
      7  /
    Age of Child
              12SY.

  • Calculate age in oracle 11g

    how do i calculate age based on date picker in another field on the same table/

    Are you sure of that algorithm?
    orclz> SELECT Round((SYSDATE-to_date('01-JAN-1989','dd-MON-yyyy'))/365) FROM DUAL;
    ROUND((SYSDATE-TO_DATE('01-JAN-1989','DD-MON-YYYY'))/365)
                                                           25
    orclz> SELECT Round((SYSDATE-to_date('01-DEC-1989','dd-MON-yyyy'))/365) FROM DUAL;
    ROUND((SYSDATE-TO_DATE('01-DEC-1989','DD-MON-YYYY'))/365)
                                                           24
    How about this:
    orclz> select extract (year from sysdate) - extract( year from to_date('01-DEC-1989','dd-MON-yyyy')) from dual;
    EXTRACT(YEARFROMSYSDATE)-EXTRACT(YEARFROMTO_DATE('01-DEC-1989','DD-MON-YYYY'))
                                                                                24
    orclz> select extract (year from sysdate) - extract( year from to_date('01-JAN-1989','dd-MON-yyyy')) from dual;
    EXTRACT(YEARFROMSYSDATE)-EXTRACT(YEARFROMTO_DATE('01-JAN-1989','DD-MON-YYYY'))
                                                                                24
    orclz>

  • ABAP-HR MODULE(HOW TO CALCULATE AGE & YEARS OF SERVICE)

    HI,
    HOW TO CALCULATE AGE & YEARS OF SERVICE means for example
    I AM USING PNPCE LDB.
    (1) whose age is greater than 52.833 years with 7.833 years of service, with annual rate of pay $170,000 or more, or
    (2) age plus employment service is 65 or more, with annual rate of pay of $ 170,000 or more.
    Note that the $ 170,000 parameter would be a variable that could change annually when this report would be generated. In the past, age and service value were determined as of the run date. The determination date would also be a variable that would change when the report would be generated.
    Thanks&Regards
    Rahul.

    Hi Rahul,
    This is the 2nd warning !!! Please... use the correct or most appropriate forum.
    The ABAP Objects Forum should be used for: ABAP Object definition and implementation including encapsulation, interfaces and inheritance in ABAP Objects.
    This thread will be moved from to .
    You're asking this question in two thread, so the duplicated thread will be deleted.
    Please have a look at [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.
    Also read this thread Welcome and Rules of Engagement.
    Greetings,
    Marcelo Ramos

  • How to Calculate %age value

    Hi All,
    i have a query
    I have data like below
    cy
    data
    CY 2008
    4290421
    CY 2009
    4069379
    CY 2010
    3979492
    CY 2011
    3940169
    and i want output like this
    cy
    data
    CY 2008
    4290421
    % change
    -5%
    CY 2009
    4069379
    % change
    -2%
    CY 2010
    3979492
    % change
    -1%
    CY 2011
    3940169
    for percent change the formula is in excel for %age change of CY 2008 to CY 2009 = (CY 2009 / CY 2008 -1 )*100
    how we can calculate in SAP BO INFOVIEW 3.1 and it will run automatically in future also for 2012,2013 so on
    Please Advice..
    Thanks in advance.
    Ranjeet

    Hi Riaz,
    Sorry for delay response
    Please find the attachment
    variable (formula) =([data]/Previous([data])-1)*100
    the final result
    if you want more information let me know
    Thanks
    Ranjeet

  • How to calculate age for a business partner for segmentation purposes?

    How do I calculate the age of a BP based on this person's maintained birthday on BP master data?  I need to use this information to segment based on age groups, eg age 30-40, age 25 and below etc.
    I did quite a bit of search on this forum but couldn't find anything.  I know I've seen them somewhere before.  Would appreciate any help and will reward points.  Thanks!

    Hi Jo,
    You can achieve this by using infosets.
    Create Infoset using direct read of table BUT000.
    In infoset select extras for additional field button and give following code for calcualting the difference between Birthdate and system date.
    CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
        EXPORTING
          i_date_from          = but000-BIRTHDT
          I_KEY_DAY_FROM       =
          i_date_to            = sy-datum
            I_KEY_DAY_TO         =
            I_FLG_SEPARATE       = ' '
       IMPORTING
         e_days               = test
            E_MONTHS             =
            E_YEARS              =
    Create a datasource with Business partner GUID and assign it attributelist.
    Choose the additional field for filter criteria.
    Hope it solves your problem.
    Reward points if it helps.
    Regards,
    Madhu

  • How to calculate Age(more details)

    Hi
    I want to calculate the age but not only depending on substracting the years, i have to take into consederation the day and month and year
    for example
    taking into consederation that the date today is 08/08/1999
    someone born on 1/1/1970
    he is 29
    someone born on 18/09/1963
    he is 35
    someone born on 12/12/1976
    he is 22
    how can we calculate the date to get these results
    Thanks

    You can use StringTokenizer to parse out the months, days and years. Once you do that it's easy to compare them to get the age.
    String today = "08/08/1999"
    String bDay = "07/10/1977"
    StringTokenizer st = new StringTokenizer(today,  "/");
    String todayMonth = st.nextToken();
    String todayDay = st.nextToken();
    String todayYear = st.nextToken();Then just do the same thing with bDay and you can compare everything to figure out the age.

  • How to Calculate AGE by getting difference between two Date Fields

    HI Gems
    I need to calculate AGE from getting difference from two date fields. But when i am trying to wrte fromula as Current date - date1(some date field) then it is showing error.
    How can i get values.
    Thanks
    Manu

    You already asked this question:
    How to calculate AGE from two different date fields

  • How to calculate AGE from two different date fields

    hi
    I need to calculate AGE from two different date fields.
    Can some help me how to do, when i try to do substraction formula it is showing error.
    Thank You
    Manu

    Manu wrote:
    Hi
    Both fields are in date format only, i need to calculate no . of days between two different dates
    Thanks
    ManuThe reason for the question about the format of the column is because the simplest solution only works on DATE columns. Others have mentioned this here, but if you want the difference between two date fields, you can use this formula:
    TIMESTAMPDIFF(SQL_TSI_DAY, date_column1, date_column2)
    The above being said, you still didn't tell me what you did, or what error message you received. So again, if the above formula didn't work, what did you do? Where did you put the formula? What was the exact syntax you used? What was the error message you got?
    Please don't make us work more than we need to. Answer all the questions in your next post. Thanks.

  • How to calculate age based on current month and over the next 12 months in Webi 4.1

    Hi,
    I am working on a report where I need to show employees who turned 65 from the time the report is run to over the next 12 months.I have the 'Date of Birth' field available. I am using Bex Query as a data source and webi 4.1. How do I calculate this in Webi 4.1. I appreciate any help.
    Thank you,
    Charvi.

    Hi Charvi,
    Get the all employees who are all in 64 age bucket till yesterday.  Keep indicator for these employees.
    Then obviously these employees will be falling in 65 age in coming 12 months/365 days.
    Same you can get at Bex level also. Create formulae :
    if employee age = 64 then 1 else 0.
    (AGE = 64 * 1 + 0)
    Then create condition on this formulae as Value = 1.
    Revert back your feedback.
    Regards, Vijay

  • How to calculate age in oracle

    Hi,
    T was trying do calculate age as on todays date in ORACLE but after a lot of brain storming i didn't get it.
    Kindly tell me how to calculate age as in years month days.
    For ex.. My DOB- 02-feb-1984 so my age should get as 27 Years 2 months 8 days
    How to do it.
    I tried this
    select
    TRUNC( months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') )/12 ) Year,
    TRUNC( mod(months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') ),12) ) Month,
    mod(months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') ),12) /30 Days
    from dual
    but days are not calculating correctly...
    RGds,
    PC

    sorry..i didn't chck your query..it is right but give wrong answer..
    WITH got_months AS
         SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
         ,     FLOOR (MONTHS_BETWEEN (SYSDATE, TO_DATE('02-02-1984','DD-MM-YYYY')))     AS months
         FROM     dual
    SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
    ,     TO_CHAR (FLOOR (months / 12))     || ' years, '     ||
         TO_CHAR (MOD (months, 12))      || ' months, '     ||
         TO_CHAR ( CEIL ( SYSDATE
              - ADD_MONTHS ( TO_DATE('02-02-1984','DD-MM-YYYY')
                        , months
              )               || ' days'
    FROM got_months
    o/p
         TO_DATE('02-02-1984','DD-MM-YY     TO_CHAR(FLOOR(MONTHS/12))||'YE
    1     2/2/1984     27 years, 7 months, 9 days
    1 day more..1     it sud be.. 2/2/1984     27 years, 7 months, 8 days
    if i make correction with add_months like below..
    WITH got_months AS
         SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
         ,     FLOOR (MONTHS_BETWEEN (SYSDATE, TO_DATE('02-02-1984','DD-MM-YYYY')))     AS months
         FROM     dual
    SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
    ,     TO_CHAR (FLOOR (months / 12))     || ' years, '     ||
         TO_CHAR (MOD (months, 12))      || ' months, '     ||
         TO_CHAR ( CEIL ( SYSDATE
              - ADD_MONTHS ( TO_DATE('02-02-1984','DD-MM-YYYY')
                        , months
                        )-1
              )               || ' days'
    FROM got_months
    then o/p is..
         TO_DATE('02-02-1984','DD-MM-YY     TO_CHAR(FLOOR(MONTHS/12))||'YE
    1     2/2/1984     27 years, 7 months, 8 days
    correct but cdnt understand why sud -1?

  • How do i calculate e age given e year of birth?

    how do i calculate e age given e year of birth?

    RubberFaceDuckie, two things:
    1) please don't crosspost all over the forums.
    2) I don't think that it would help much if we tell you the code for such a simple operation; if you have trouble doing this, either go and tell your teacher (maybe the better idea), or try to figure it out alone. This problem shouldn't be unsolvable for you, and it seems to me that you need more practice and to spent more thoughts on your solution. Before you write a program, you should be sure about the program's algorithm.

Maybe you are looking for