Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Time subtraction
Name: Chipcom Date: April 2, 2007 at 11:15:09 Pacific OS: XP SP2 CPU/Ram: 2GhZ Product: Intel
Don't know about access VBA but it is very similar to VBScript. This is how I would do it in VBScript. You can stick the following into a .wsf file and run it from the command line.
<job> <script language="vbscript"> dim t1, t2, dayfrac, h, m, s t1 = #18:03:00# t2 = #8:00:00# dayfrac = t1 - t2 s = clng(dayfrac * 86400) h = s \ 3600 s = s mod 3600 m = s \ 60 s = s mod 60 ' Do this instead of format date in case we get 24:00:00. WScript.echo right(cstr(h+100),2) & ":" & right(cstr(m+100),2) & ":" & right(cstr(s+100),2) </script> </job>
Summary: ok i've been trying to teach myself programming for a little while and decided that i'd create a little app so when i'm chatting with somebody in another timezone it would take my current time and add...
Summary: Thank you all for replying. I need it to find how long a program takes to execute, so I took the Left 2 characters of the Right 5 characters of the Time for the start and end time and subtracted it (U...