SOLVED

date conversion

Copper Contributor

converting a date in three cells to one cell

2 Replies
best response confirmed by mtarler (Silver Contributor)
Solution

@Richard_96 

If you have a year in A2, a month number (1 - 12) in B2 and a day number (1 - 31) in C2, the formula

=DATE(A2,B2,C2)

will return the date.

If B2 contains a month name (for example Jan or January) instead of a month number, use

=DATEVALUE(C2&"-"&B2&"-"&A2)

In both cases, format the cell with the formula with your preferred date format.

Thanks for your prompt reply. You have resolved my problem.

1 best response

Accepted Solutions
best response confirmed by mtarler (Silver Contributor)
Solution

@Richard_96 

If you have a year in A2, a month number (1 - 12) in B2 and a day number (1 - 31) in C2, the formula

=DATE(A2,B2,C2)

will return the date.

If B2 contains a month name (for example Jan or January) instead of a month number, use

=DATEVALUE(C2&"-"&B2&"-"&A2)

In both cases, format the cell with the formula with your preferred date format.

View solution in original post