Convert 24/03/2010 date into 03/24/2010 date format

N

Nitesh

Hi ,

I’m using Ms Excel 2003 and in my excel sheet there is a column in which
dates are entered as DD/MM/YYYY (e.g. 24/03/2010 as a text) format and I
wanted to convert it into MM/DD/YYYY (e.g. 03/24/2010).

Can excel programming is required to convert such date or is there any excel
function.

Please suggest.
 
O

OssieMac

Hi Nitesh,

Because you say the dates are entered as text you can use Text to Columns to
change it to a real date and it should format the cells as dates.

Select the column with the text dates.
Select menu item Data -> Text to columns -> Fixed width -> Next -> Next-> Date
At the Date dropdown select the date format that it is in currently ie. D/M/Y
Click finish.

The date will now be in your regional date format and the cell formatted as
Date. Now you can re-format the date using Number format to any format you
want.
 
J

Javed

Hi ,

I’m using Ms Excel 2003 and in my excel sheet there is a column in which
dates are entered as DD/MM/YYYY (e.g. 24/03/2010 as a text) format and I
wanted to convert it into MM/DD/YYYY (e.g. 03/24/2010).

Can excel programming is required to convert such date or is there any excel
function.

Please suggest.

--

You can use following code.

Just paste the following in any standard module.Call like any other
function from Function Wizard (It will be in Usedr Defined Category)

Function DateConvert(dte As String, Optional sep As String = ".")
Dim fstpos As Integer, sndpos As Integer
fstpos = InStr(1, dte, sep, vbTextCompare)
sndpos = InStr(1 + fstpos, dte, sep, vbTextCompare)
DateConvert = DateSerial(Mid(dte, sndpos + 1, 50) _
, Mid(dte, fstpos + 1, sndpos - fstpos - 1) _
, Left(dte, fstpos - 1))
End Function


You may use excel function Mid,Date,Right,Left but that will be a
large one.
 
M

Modeste

Bonsour®

"Nitesh" a écrit > I’m using Ms Excel 2003 and in my excel sheet there is a
column in which
dates are entered as DD/MM/YYYY (e.g. 24/03/2010 as a text) format and I
wanted to convert it into MM/DD/YYYY (e.g. 03/24/2010).

select the column with dates
menu > datas > convert
at step 3
select date format DMY
OK
 

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

Top