Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Calculation Problems with COM Server
Message
From
23/05/2003 15:40:30
 
 
To
23/05/2003 15:02:33
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00792372
Message ID:
00792393
Views:
24
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
Map
View

Click here to load this message in the networking platform