4

I am trying to convert a date from a format with slashes to one with dashes. however when i try:

=SUBSTITUTE(B3,"/","-")

It converts my the would-be date into a date integer. I have tried formatting it and it doesn't work on the expression. Does anyone know a way to do this? Preferably one that does not involve having to use VBA?

  • 2
    Does B3 contain a real date value or text? If your formula results in a number, then you can format the result as a date. – teylyn Jul 5 '17 at 22:27
12

Simply

=B3

and format the cell with Custom format mm-dd-yyyy (write this format in the type box of the custom format dialog).

  • 1
    Thanks, I had a feeling I was missing something really obvious. – Beninja2 Jul 6 '17 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.