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  dBforums > PC based Database Applications > Microsoft Excel > Date format problems in excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-18-09, 09:51
chellie chellie is offline
Registered User
 
Join Date: Aug 2009
Posts: 2
Date format problems in excel

I have an excel sheet that was imported via txt file but I do not have a copy of the txt file and our programmer is out this week. I hope someone can assist. Currently it is listed as DD MM YY (with spaces) and I need it to convert to dd-mon-yy.

Any assistance is much appreciated!

Chellie
Reply With Quote
  #2 (permalink)  
Old 08-18-09, 10:47
CasparV CasparV is offline
Registered User
 
Join Date: Jul 2007
Posts: 54
The solution all depends on how the date is currently formatted. It sounds like it is there as text and I am assuming that 1st February 2009 would be shown as 01 02 2009.

That being the case, you will have to re-assemble the pieces to make a date that Excel recognises and then you can use normal Excel formatting to get it to display however you want.

The way I would do this is to put a formula into an empty column which looked something like this:

=Date(Right(Trim(Nx),4), Mid(Trim(Nx),4,2), Left(Trim(Nx),2))

where Nx is the location of your data (N being the column and x being the row). The Trim function is used to remove any unwanted spaces that are there but you cannot see and might otherwise much this up.

Now you should have a date and you can format the cell (or whole column) using the Format function and choosing the Number tab - there are some defaults available for Date, but if you cannot find the one you want then choose Custom and type in dd-mmm-yy.

Now you can shuffle your columns around and hide the original.

Hope this all helps.

Thanks,
Caspar
Reply With Quote
  #3 (permalink)  
Old 08-19-09, 13:01
chellie chellie is offline
Registered User
 
Join Date: Aug 2009
Posts: 2
Caspar you are my new best friend! It worked perfectly. Thank you so much!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On