The information in this article applies to:
SUMMARY
Passing a file name with a time stamp of midnight to the function
FileDateTime, returns a string containing only the date, not the time.
This is consistent with the Format/Format$ function's General Date
format, which when passed a DateTime string with a time of midnight
returns a string containing only the date.
MORE INFORMATION
The internal structure of a serial number is a double precision number. The
integral portion represents the number of days since December 30, 1899 and
the fractional portion represents the time as a fraction of a day. Midnight
is the beginning of a day and therefore it's represented by the fraction
zero. 33898.25The date is 33898 days since 12/30/1899. The time is represented as one-fourth of the 24-hour day passed since midnight. One-fourth of 24 is exactly 6, so the time is 6 hours, 0 minutes, 0 seconds. Using the General Date format for a DateTime string without using a time in Format($), automatically returns a formatted string without a time portion. This is by design. Because both midnight and DateTime strings without a time are represented internally as the same number, the General Date format processes the strings identically. Steps to Reproduce Problem
Additional query words: 2.00 3.00
Keywords : |
Last Reviewed: August 31, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |