PDA

Click to See Complete Forum and Search --> : Time Calculation


ltlearn
Nov 13th, 2000, 10:39 AM
Haved use the GetFileTime API function to get the date and time of the file. Do you know how to calculate the date, and also the time if I the program is given with two dates, and two time, i.e. subtraction or addition of date and time.

Thanks.

Nov 13th, 2000, 01:24 PM
Take a look at the DateAdd function located in your MSDN Libary (or help file).

DateAdd(interval, number, date)

ltlearn
Nov 13th, 2000, 11:07 PM
I tried to use the DateAdd, DateDiff function. But I was not able to put in the time, instead only date format is used in the function.

Thinking of disassemble the time and re-assemble it back after the calculation, is it a good move ?

matbrophy
Nov 14th, 2000, 02:02 PM
Not a bad idea, you could separate it with format$. You would need to check if the hours had become bigger than 12 or 24 and whether the minutes had become bigger than 60.

Matthew