Thanks, Shawn, that works perfectly!
Lee Hudson, R&D Scientist
Philips Lumileds Lighting Company
370 West Trimble Road, MS-91ML
San Jose, CA 95131
+1 408 964 2658
+1 408 964 5284
"Shawn Fessenden" <email@example.com> wrote on 06/02/2006 08:38:15 AM:
> > Does anyone know how to use the
> > DateTime.Compare(t1,t2) function
> This is a static function that compares two DateTime objects. The result is
> less than zero if t1 is less than t2, zero if equal or greater than zero if
> t1 is greater than t2. See also member CompareTo.
> Cut the ToString off the end of the default formula - you want DateTime
> objects, not strings.
> Set t1 = System.IO.File.GetLastAccessTime("c:\ntldr");
> Set t2 = System.DateTime.Now;
> Set uptime = System.DateTime.op_Subtraction(t2, t1);
> // (Should) always return negative.
> comp1 = System.DateTime.Compare(t1, t2);
> // (Should) always return positive.
> comp2 = System.DateTime.Compare(t2, t1);
> Should because nothing but the boot sequence touches ntldr. OTOH it is just
> a file, so you can read it if you want.
> Avoid a file pick dialog - the default VEE file pick touches the file to
> make sure the selected action (reading or writing) will succeed, so the last
> access time is the time the object executes.
--- To subscribe please send an email to: "firstname.lastname@example.org" with the word subscribe in the message body. To unsubscribe send a blank email to "email@example.com". To send messages to this mailing list, email "firstname.lastname@example.org". If you need help with the mailing list send a message to "email@example.com". Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".