Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

Re-format date (mm/dd/yyyy into dd/mm/yyyy)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert - 11 Apr 2007 09:45 GMT
Hi All,

Could someone help me with the following:
I have a range of dates which I want to convert from mm/dd/yyyy into
dd/mm/yyyy, my formula
(=MID(T1474,LEN(T1474)-6,2)&"/"&LEFT(T1474,2)&"/"&RIGHT(T1474,4))
works for most of the dates though in case of 1/12/2007 where the
month only has one position (instead of 01) my formula takes "1/" for
mm (instead of "01")

Can one of you advice how to capture this issue in my (or a different)
formula?

Many thanks!!!!

Rgds,
Robert
Lori - 11 Apr 2007 10:08 GMT
You could try: Data > Text to Columns > Next > Next > Date:MDY
on the column.

In the last step you can choose Destination in another adjacent column
if you want to put the results in another column.

> Hi All,
>
[quoted text clipped - 13 lines]
> Rgds,
> Robert
Ron Rosenfeld - 11 Apr 2007 11:31 GMT
>Hi All,
>
[quoted text clipped - 13 lines]
>Rgds,
>Robert

It seems from your formula that you want the result to be a text string, and
not a formatted Excel Date (an Excel date is a serial number formatted to look
like a date).

If that is  the case, then the formula to use depends on the nature of the
original in T1474.

If T1474 is a serial number formatted to look like a date, then use this:

=TEXT(T1474, "dd/mm/yyyy")

If, on the other hand, T1474 is a text string, and you want to convert it to a
text string, then this should work:

=TEXT(DATE(RIGHT(T1474,2),LEFT(T1474,FIND("/",T1474)-1),
MID(T1474,FIND("/",T1474)+1,FIND(CHAR(1),SUBSTITUTE(
T1474,"/",CHAR(1),2))-FIND("/",T1474)-1)),"dd/mm/yy")

Obviously, there are various permutations of whether T1474 is text or a date,
versus what you want your result to be.

For example, if T1474 was a date, and you wanted your result to be a date, then
simply:

=T1474  and format the result  (Format/Cell/Number/Custom Type: "dd/mm/yy")

--ron

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.