Results 1 to 4 of 4

Thread: Time Calculation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Location
    Posts
    124
    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.

  2. #2
    Guest
    Take a look at the DateAdd function located in your MSDN Libary (or help file).

    DateAdd(interval, number, date)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Location
    Posts
    124
    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 ?

  4. #4
    Addicted Member matbrophy's Avatar
    Join Date
    Sep 1999
    Location
    Kent, United Kingdom
    Posts
    149
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width