New date variable

I'm trying to create a new date variable using values from other variables using several date functions.

I want to use the month function and day function from the Hire_Date field and the constant of the year 2009 in the MDY function.

HDate=mdy(Hire_Date, Hire_Date, 2009)

I get an error message when using the comma as well as without a comma. What am I missing? Any assistance would be appreciated. Thanks.
Last edited:
Don't worry. I figured it out. I forgot to put the month and day for the reference variable in the formula

HDate=mdy(month(Hire_Date), day(Hire_Date), 2009).

The code works now. Thanks.
Last edited: