To all,
I wrote a fairly complex database import from an Excel file using automation. (Don't ask me to explain the reasons, that's simply what was decided) Anyway, someone brought to my attention recently that some of the dates were coming in incorrectly: they were one day off. I couldn't understand how that could be: the code for this has not changed in over 2 years.
So, I went looking. And sure enough, they were right. The dates were coming in wrong. I couldn't figure it out. Everything in the Excel file looks fine. It's showing the correct dates and it's using the 3/14/2001 format.
So, I went through the command window and typed the following:
o=CreateObject('excel.application')
o.Visible=.t.
o.Workbooks.Add()
ow=o.ActiveSheet
ow.Cells(1,1).Value = Transform({^1900/01/01})
?ow.Cells(1,1).Value
ow.Cells(1,1).Value = Transform({^1900/01/02})
?ow.Cells(1,1).Value
o.Workbooks.Close()
o.Quit()
I know this code worked perfectly before. And now in XP, I'm seeing this behavior. What's going on?!! Can someone tell me why this is happening or why MS thinks this behavior is acceptable?
TIA,
Travis
Travis Vandersypen