General information
Category:
COM/DCOM and OLE Automation
That worked! So, it seems to be the subtracting-the-day-from-the-date part that doesn't work. I tested it, and the DAY function returns the correct day of the month, but when subtracted, it comes up with yesterday, just the same as my calculation, even though my calculation was also adding a 1.
I just figured it out while testing. COM must be using DATETIME instead of DATE. I calculated the number of seconds in 22 days (1,900,800) and subtracted, and got the correct date.
Have you heard of this before?
My passed-in date :05/23/2003
My original result :05/22/2003
Steve's Result :05/01/2003
Just DAY function :23
Date - day function :05/22/2003
Date + 1 function :05/23/2003
Date - 23 :05/22/2003
Date - 22 :05/22/2003
Date - 1900800 :05/01/2003
Thanks for your help!
Kirk
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only