Problems Calculating time

Results 1 to 4 of 4

Thread: Problems Calculating time

  1. #1
    Brian S Guest

    Default Problems Calculating time

    I am trying to calculate total time spent on the site. If I log the time in and then the time out and subtract the time out from the time in I should get the total time spent. I cannot figure out how to do it. The time in and time out data is stored in an ACCESS Database and is stored as the medium format. (5:23 AM) When I try to subtract the two, I think that the AM or PM extension messes up the calculation I get some thing like -8.60000000000 -E. Any ideas?

  2. #2
    Klalter Santos Guest

    Default RE: Problems Calculating time

    Hi... u can use the formatdate to format your time as u wish.. for example if u use a formatdate(now(), 4) .. 4 is a shorttime mode... the shorttime remove the AM and PM and show 1:00 PM as 13:00 .. do u get? like this u can do all the counts... <BR>i hope to help u... <BR>

  3. #3
    milind Guest

    Default RE: Problems Calculating time

    hi brian , try doing this in vb script -<BR><BR>DateDiff( "s" , date1 , date1 ) <BR><BR>date can take any format . offcorse u&#039ll have 2 catch the database values in vbscript variables before u do thsi . <BR>the first argumnt is s for seconds . u can have d for days , m for months n for minutes etc. <BR>hope this works . <BR>do rply <BR><BR>

  4. #4
    Join Date
    Dec 1969

    Default RE: Problems Calculating time

    Thanks for the help, I really appreciate it!

Posting Permissions

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