IBM Sterling Transformation Extender

 View Only
  • 1.  How to calculate Age?

    Posted Mon September 21, 2015 11:27 AM

    Originally posted by: RFcr


    Hi,

     

    I want to calculate age using DOB and currentdate(), can anyone help me how to do this? 

     

     

    Thank you!


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: How to calculate Age?

    Posted Mon September 21, 2015 11:54 AM
      |   view attached

    Originally posted by: paul.brett


    Perhaps this example will help.

    Input : 08/04/1975    (here representing 8th April 1975)

    Output:

    Days : 14776
    Years : 40.4821917808
    Whole Years : 40

    Thank-you.

    Paul.

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender

    Attachment(s)

    zip
    AgeCalculation.zip   2 KB 1 version


  • 3.  RE: Re: How to calculate Age?

    Posted Sun March 02, 2025 03:36 PM

    You can calculate age by subtracting the birth year from the current year. However, for a more precise calculation that includes months, days, hours, and even minutes, you can use online tools.

    For an accurate and quick age calculation, check out حساب العمر بالدقائق, where you can find a detailed breakdown of your age in years, months, days, and even minutes!



    ------------------------------
    Adeel Ali
    ------------------------------



  • 4.  Re: How to calculate Age?

    Posted Mon September 21, 2015 11:59 AM

    Originally posted by: paul.brett


    Perhaps I should have divided by 365.25 (to account for leap years) and used INT() instead of ABS().

    Play around with the example, and let us know what you end up using.

    Thank-you.

    Paul.

    Follow me on Twitter


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 5.  Re: How to calculate Age?

    Posted Mon September 21, 2015 12:09 PM

    Originally posted by: paul.brett


    In summary, my solution would be:

    =INT((DATETONUMBER(CURRENTDATE())-DATETONUMBER( DOB_Object ))/365.25)

    Thank-you.

    Paul.

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 6.  Re: How to calculate Age?

    Posted Wed September 23, 2015 11:03 AM

    Originally posted by: RFcr


    Hi.

    Thank you Paul!. The second solution worked. 


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange