IN Add Duration function how can i put duration as a variable value?

ADD_DURATION( pageVars.date, 10, “days”)

IN Add Duration function how can i put duration as a variable value which is taken by user instead of
giving a number type?

ADD_DURATION( pageVars.date, pageVars.day, “days”)