|
-
Jan 3rd, 2011, 01:33 PM
#8
Re: Real time
I'm not sure what sort of mischief you're trying to guard against, or why it is critical that:
the documents have to folloves each to another by dates
You might consider though that using the usual Date(), Time(), Now() are meant to tell the user what time (and date) it is, not for creating important timestamps.
The most obvious thing to consider is that Daylight Savings Time can come or go between the creation of two of your "documents." So you might create Document A when Now() reports one time, then a minute later create Document B just after crossing back to Standard Time and have Now() report a time 59 minutes earlier.
Filesystem timestamps are generally in UTC, getting around the problem much of the time.
Date(), Time(), and Now() do not report the system time, but give the system time corrected to the current time zone (i.e. the local time). The system time is UTC.
GetSystemTime Function
None of that solves your dilemma, but should be considered if you're planning to rely on values from the intrinsic date and time functions in VB.
Maybe if you can tell us why:
the documents have to folloves each to another by dates
... we might suggest alternatives.
For example perhaps you'd be better off with a "document ID" value that gets bumped every time a new "document" is created? That might be more useful in establishing chronology (or ordinality at least).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|