A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Display Modes
  #1  
Old June 5th 10, 05:34 AM posted to microsoft.public.excel.programming
nitesh
external usenet poster
 
Posts: 11
Default Convert 24/03/2010 date into 03/24/2010 date format

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.

--
------------------------------
Thanks
Nitesh
------------------------------

Ads
  #2  
Old June 5th 10, 06:00 AM posted to microsoft.public.excel.programming
OssieMac
external usenet poster
 
Posts: 2,510
Default Convert 24/03/2010 date into 03/24/2010 date format

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.


--
Regards,

OssieMac


"Nitesh" wrote:

> 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.
>
> --
> ------------------------------
> Thanks
> Nitesh
> ------------------------------
>

  #3  
Old June 5th 10, 06:02 AM posted to microsoft.public.excel.programming
Javed
external usenet poster
 
Posts: 91
Default Convert 24/03/2010 date into 03/24/2010 date format

On Jun 5, 9:34*am, Nitesh > wrote:
> 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.
>
> --
> ------------------------------
> Thanks
> Nitesh
> ------------------------------


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.
  #4  
Old June 5th 10, 10:44 AM posted to microsoft.public.excel.programming
Modeste[_2_]
external usenet poster
 
Posts: 6
Default Convert 24/03/2010 date into 03/24/2010 date format

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
change date format year to another (e.g., from 1/2/2010 to 1/2/2009) Roger317 Excel Discussion (Misc queries) 1 October 4th 10 08:29 AM
date format...3.1.2010 backmara Excel Programming 1 March 23rd 10 11:57 AM
how can i get the date & time format 2010/02/17 12:05 in excel NarenSelva Excel Discussion (Misc queries) 2 March 2nd 10 08:56 AM
2010 date in Excel 2000 BudW Excel Discussion (Misc queries) 2 January 5th 10 04:59 PM


All times are GMT +1. The time now is 06:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 ExcelBanter.
The comments are property of their posters.