Using Date Time as Default

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
shep said:
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

Remember that no matter how it looks the actual data of a date-time
field is always stored the same way. Access changes the format as it is
displayed.

Access tables are not really designed to display data or to work with
data. You should be using queries, forms and reports to view and edit your
data and you will want to define the format in the query, form or report,
not in the table.
 
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
 
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]
 
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
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Date search query 0
Date Format Question Again 2
Insert into (dates format) VBA 6
Date Format 2
Excel is Confused 2
Default Value as last date in a table? 5
Date Formatting 1
Date Format 6

Back
Top