Using Date Time as Default

S

shep

I am using MS ACCESS 2003
I have a date field in a table with default set to =Now().
I use that field in a form and a report.

I would like to have the format "yymmdd""-""hhmmss" rather than the general
date time =Now() produces.

Is there an expression I can use as the default to produce the desired format?

Thanks in advance
 
S

Steve Schapel

Shep,

You can use the Format property of the controls on your forms and
reports for this purpose. Setting the Format property of the field in
the table design will propogate the same format through to new forms or
reports based on the table. Just enter this in the Format property...
yymmdd-hhmmss
 
J

John Vinson

I am using MS ACCESS 2003
I have a date field in a table with default set to =Now().
I use that field in a form and a report.

I would like to have the format "yymmdd""-""hhmmss" rather than the general
date time =Now() produces.

Is there an expression I can use as the default to produce the desired format?

Thanks in advance

A Date/Time field is actually *stored* as a double float number, a
count of days and fractions of a day (times) since midnight, December
30, 1899. The format is relevant only for display, and it's not stored
with the value.

You can set the Format properties of the textboxes on the form and
report any way you like. The date/time value stored in the table will
be displayed in accordance.


John W. Vinson[MVP]
 
S

shep

Thank you, that helped.

Steve Schapel said:
Shep,

You can use the Format property of the controls on your forms and
reports for this purpose. Setting the Format property of the field in
the table design will propogate the same format through to new forms or
reports based on the table. Just enter this in the Format property...
yymmdd-hhmmss
 
S

shep

Thank you, that helped

John Vinson said:
A Date/Time field is actually *stored* as a double float number, a
count of days and fractions of a day (times) since midnight, December
30, 1899. The format is relevant only for display, and it's not stored
with the value.

You can set the Format properties of the textboxes on the form and
report any way you like. The date/time value stored in the table will
be displayed in accordance.


John W. Vinson[MVP]
 
Top