Adding years to date function

Sort:
You are not authorized to post a reply.
Author
Messages
Roger French
Veteran Member
Posts: 545
Veteran Member

    Old Processflow in V9, 

    Date = getDateDME(AddYear(pfDate(Query1_BIRTHDATE,'mm/dd/yyyy'),AgeVar))

     

    Let's say Birthdate = 2/1/1990 and AgeVar=40

    Where Date is defined as a String type. Query1_BIRTHDATE is from a DME query. AgeVar is an integer.

    This returns a correct formatted date: Date =  2/1/2030

    .

     

    In IPA in V10, this same flow  returns an incorrect string. It returns Date = 2/2/199040

    In other words, it is concactenating the AgeVar to the Birthdate.

    I'm fairly certain this has been done before, but has anyone successfully added an amount of years to a date field in IPA using Javascript? If so, what did you use for the functions to get them to add correctly?

     

    Thanks in advance.

     

     

    You are not authorized to post a reply.