storing dates

L

Leon

When dates are captured in a table, which format is used. Is it the date
format from the regional settings in windows?
 
A

Allen Browne

Internally, Access stores date/time data as a special kind of floating point
value.

The integer part represents date (number of days since Dec 30, 1899), and
the fractional part represents the part of the day (0.25 = 6am, i.e. 1/4 of
a day; 0.5 = noon, ...)

This numeric value is formatted at display time according to the Format
property of the Field (in a table or query) or text box (on a form or
report.) If the Format property is blank, Access uses the format specified
in the Regional Settings of the Windows Control Panel.

For details on how to ensure Access interprets the date correctly regardless
of your regional settings, see:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

To demonstrate how the dates are stored within Access, open the Immediate
Window (Ctrl+G), and enter expressions such as this:
? Format(0, "Long Date")
? CDbl(Now())
 
Top