# Alteryx Designer Discussions

It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

## Formula to arrive at date when I have Day, Month and Year in separate columns

Highlighted
5 - Atom

Can someone please help me to arrive at the date, when I have the day, month and year in three different columns.

Any help will be appreciated.

 Day Month Year Desired Output 10 12 2009 10-12-2009 8 6 2018 08-06-2018 19 1 2000 19-01-2000
Highlighted
16 - Nebula

The formula would be [Day]+'-'+[Month]+'-'+[Year] for your new field, but please note that the Alteryx standard date format is yyyy-mm-dd.

Highlighted
14 - Magnetar

Hi @Upansu!

@DavidP is correct in that you can just append the fields together using the plus sign and quotes. Here are a couple additional specifications if you need them:

• The fields must already be strings coming into the Formula tool OR you can use the tostring() function each time you reference one of the field names if they're numeric.

• If you need the leading zero's and the day or month number is only one digit, you could adjust the formula to look like this:
`iif(length([Day])=1,"0"+[Day],[Day])+"-"+iif(length([Month])=1,"0"+[Month],[Month])+"-"+[Year]`

This should still be output as a new string field.

• If you want your new field to be a date type, adjust the formula to look like this:
`datetimeparse([Day]+"-"+[Month]+"-"+[Year],"%e-%m-%Y")`

This will allow Alteryx to recognize your new field as an actual date field if you need to perform any calculations on it or anything downstream and will output the field in Alteryx's yyyy-mm=dd format.

Labels