Coverting Dates to Text

  • Thread starter Thread starter scott
  • Start date Start date
S

scott

I've got a column that contains cells like 0-04-1, which is a text code with
a dash delimiter. But Excel converts them to dates when the figures get
imported from a file.

Can someone help me create a formula that could convert 1/4/2001 to 0-04-01?

Another example would be:

1/6/2001 should be 0-06-1
 
Scott,

Try =TEXT(A1,"d-mm-y")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
It almost works, but here's the results.

EXAMPLE 1:
' below is a correct entry and then your formula result which is good
0-04-1 returns 0-04-1

EXAMPLE 2
' below is an incorrect entry and then your formula result which is bad
1/4/2001 returns 4-01-01

EXAMPLE 2 result should end up like EXAMPLE 1. That is both should return
0-04-1
 
Sorry Scott, the format will always give at least 2 year digits.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top