Strip date from string and transfer datetext to number
On Sat, 3 Jul 2004 09:27:07 -0500, MSP77079
wrote:
myDate = Datevalue(Left("04Oct20040000", 9))
Did you test that? I can't seem to get it to work on my machine.
On my computer, using VBA 6.3, Datevalue does not seem to work in the absence
of some kind of separator between the components. I get Type Mismatch error
with your function.
But even with the spaces, I still get a Type Mismatch error if regional
settings are set to Danish:
?Datevalue(Left("04 Oct 20040000", 11)) gives Type Mismatch error.
--ron
|