0

I have a date field value in an excel column as 9/2/2016.

I need to use text formula to put the value like this 09-02-2016. I know if I manually enter such a value it will automatically take it as 9/2/2016. I need to put '09-02-2016 to get my desired output. Now the problem is I need to build this thing using FORMULA TEXT and concatenation in a column beside where the data rests.

Can someone let me know how to achieve that?

Thanks!

2
  • 1
    Hi. You need a text formula field returning your date field but with this format: 'dd-MM-yyyy'? Jan 18, 2017 at 8:51
  • How to get that? Jan 18, 2017 at 8:54

1 Answer 1

1

Here's the formula:

IF(DAY( YourDate) < 10, '0' & TEXT(DAY( YourDate)), TEXT(DAY( YourDate))) & '-' & IF(MONTH( YourDate) < 10, '0' & TEXT(MONTH( YourDate)), TEXT(MONTH( YourDate))) & '-' & TEXT(YEAR( YourDate))
1
  • 1
    You're welcome. Glad I could help. Jan 18, 2017 at 9:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .