07-11-2005 07:10 AM
07-11-2005 08:34 AM
In my opinion the best way to perform date/time calculation is to rely on SDK functions.
SystemTimeToVariantTime transforms a SYSTEMTIME structure into a variant time, i.e. a decimal number whose integer portion is related to date and whose fractional portion relates to time. VariantTimeToSystemTime performs the opposite operation, returning the value in a SYSTEMTIME whose elements are day/month/...
Once in variant time, you can add, subtract, etc time and date with the corresponding algebric operations. It's basically what excel does with Date/Time format.