Forum Discussion

Richard_96's avatar
Richard_96
Copper Contributor
Jan 23, 2023
Solved

date conversion

converting a date in three cells to one cell

  • 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.

  • 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.

Resources