ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need help with dates (https://www.excelbanter.com/excel-programming/334206-need-help-dates.html)

Sethaholic[_7_]

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 :confused:


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


Tom Ogilvy

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 :confused:


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

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





All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com