Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with dates


Hi,

My worksheet extracts data from another source, but the dates are in a
weird format. For example, 20050607. This means 06/07/2005. I have
tried several ways to try to fix this number to look like a date, but I
can't seem to do it. How can I format numbers like 19990509 into a date
format like 05/09/1999? Please help!! Thanks in advance


--
Sethaholic
------------------------------------------------------------------------
Sethaholic's Profile: http://www.excelforum.com/member.php...o&userid=25113
View this thread: http://www.excelforum.com/showthread...hreadid=386236

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need help with dates

for each cell in selection
cell.value = Mid(cell,5,2) & "/" & right(cell,2) & "/" & Left(cell,4)
Next

You might need to format the cell as date as well.
You dates are ambiguous, so I don't know whether you are a mm/dd/yyyy or
dd/mm/yyyy kind of person.
--
Regards,
Tom Ogilvy

"Sethaholic" wrote
in message ...

Hi,

My worksheet extracts data from another source, but the dates are in a
weird format. For example, 20050607. This means 06/07/2005. I have
tried several ways to try to fix this number to look like a date, but I
can't seem to do it. How can I format numbers like 19990509 into a date
format like 05/09/1999? Please help!! Thanks in advance


--
Sethaholic
------------------------------------------------------------------------
Sethaholic's Profile:

http://www.excelforum.com/member.php...o&userid=25113
View this thread: http://www.excelforum.com/showthread...hreadid=386236



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking computer dates (time) to spreadsheet dates that have formu bigisle Excel Worksheet Functions 3 January 3rd 10 08:05 PM
Stop dates from showing as numbers - when formated as dates JR Excel Discussion (Misc queries) 1 October 29th 08 04:38 PM
how do I sort a column of random dates into Consecutive dates Rob Gibson Excel Worksheet Functions 2 June 12th 07 05:10 AM
Toggle a range of Julian dates to Gregorian Dates and Back PSKelligan Excel Programming 4 May 8th 07 05:51 AM
Identifying unique dates in a range of cells containing dates... cdavidson Excel Discussion (Misc queries) 4 October 13th 06 03:30 PM


All times are GMT +1. The time now is 04:00 AM.

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

About Us

"It's about Microsoft Excel"