Posted to microsoft.public.excel.misc
|
|
Convert text date to general number
You legend!
Thanks
You deserve your MVP
--
Andrew
"Rick Rothstein (MVP - VB)" wrote:
Try this...
The_Date = "190707"
SerialNumber = CDbl(DateSerial("20" & Right$(The_Date, 2), _
Mid$(The_Date, 3, 2), Left$(The_Date, 2)))
Rick
"Andrew" wrote in message
...
Sorry, I should have explained I had the date in a variable name
(The_Date)
in VBA code.
Any ideas?
--
Andrew
"Peo Sjoblom" wrote:
Make sure the cells are not formatted as text, then do datatext to
columns,
click next twice, in step 3 select date under column data format and from
date dropdown select DMY, click finish
--
Regards,
Peo Sjoblom
"Andrew" wrote in message
...
Hi,
I have a text value for the date. I want to convert it to a number
(ie
from 190707 to 39282). Please note the format of the date is ddmmyy
--
Andrew
|