date/time

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

Guest

what is the correct syntex in the "Data Type" to show both Date and Time in
the same field on a form.
 
Bobcat,

If you are talking about the Data Type of the field in the design of
your table, you don't have any choice. Date/Time is the "Data Type".
Into this field can be entered a date, or a time, or both. If you are
using a control on a form to enter/edit/view this information, its
*appearance* (as distinct from its value) will be determined by the
Format property of the control, and for this you have a lot of
flexibility. Not only that, but you can enter the data in one format,
and it will immediately be displayed in the defined format. For
example, you could have the Format prop[erty of the control on the form
set to like this...
mmm dd", "yyyy hh:nnam/pm
.... and you could simply enter 7/23 or 23/7 (depending where you live)
and you will immediately see:
Jul 23, 2006 12:00am

If this doesn't help answer your question, please post back with more
details of waht you are trying to do.
 
in the input mask i'm trying 99/99/00-00.00 (24hour) but it keeps telling me
that it is wrong. I am redoing an existing database that someone else built,
and need to convert the old (two fields) date/time fields to one field for
calculations

Steve Schapel said:
Bobcat,

If you are talking about the Data Type of the field in the design of
your table, you don't have any choice. Date/Time is the "Data Type".
Into this field can be entered a date, or a time, or both. If you are
using a control on a form to enter/edit/view this information, its
*appearance* (as distinct from its value) will be determined by the
Format property of the control, and for this you have a lot of
flexibility. Not only that, but you can enter the data in one format,
and it will immediately be displayed in the defined format. For
example, you could have the Format prop[erty of the control on the form
set to like this...
mmm dd", "yyyy hh:nnam/pm
.... and you could simply enter 7/23 or 23/7 (depending where you live)
and you will immediately see:
Jul 23, 2006 12:00am

If this doesn't help answer your question, please post back with more
details of waht you are trying to do.

--
Steve Schapel, Microsoft Access MVP
what is the correct syntex in the "Data Type" to show both Date and Time in
the same field on a form.
 
Bobcat,

I myself would avoid using an Input Mask for dates and times. I am not
sure what you hope to achieve by using such, but generally I would say
it is unlikely to help anything. In any case, it would only apply to
newly entered data, so is not relevant to your exisitng data.

Having said that, I am not sure where you are located, but in most
regions the time separator is a : not a . and I would also not use the -
between the date and the time, so if you insisit on using an input mask
I would try it more like this...
90/90/0000 00:00
 
Hi Bobcat

This assumes that in your regional settings of Windows the date separator is
slash(/) and the time separator is colon(:)

The input mask should be 00/00/00\ 00:00;0;_

The format is dd/mm/yy hh:nn (or mm/dd/yy hh:nn depending on where you
are).
If still want the dash and time separator displayed as dot the format is:
dd/mm/yy"-"hh"."nn

+++

To combine the two fields from the old database:

1.Import both of them into the New Table as say, oldDate, and oldTime
2. Create a new Date Type Field say, dtDate
3. Create an update Query
4. Drag DtDate into the "Field:" row
5: In the "Criteria:" type [oldDate]+[oldTime]
6. Run the query
7. If all is OK you can delete OldDate and OldTime from the new table

Regard/JK




Bobcat said:
in the input mask i'm trying 99/99/00-00.00 (24hour) but it keeps telling
me
that it is wrong. I am redoing an existing database that someone else
built,
and need to convert the old (two fields) date/time fields to one field for
calculations

Steve Schapel said:
Bobcat,

If you are talking about the Data Type of the field in the design of
your table, you don't have any choice. Date/Time is the "Data Type".
Into this field can be entered a date, or a time, or both. If you are
using a control on a form to enter/edit/view this information, its
*appearance* (as distinct from its value) will be determined by the
Format property of the control, and for this you have a lot of
flexibility. Not only that, but you can enter the data in one format,
and it will immediately be displayed in the defined format. For
example, you could have the Format prop[erty of the control on the form
set to like this...
mmm dd", "yyyy hh:nnam/pm
.... and you could simply enter 7/23 or 23/7 (depending where you live)
and you will immediately see:
Jul 23, 2006 12:00am

If this doesn't help answer your question, please post back with more
details of waht you are trying to do.

--
Steve Schapel, Microsoft Access MVP
what is the correct syntex in the "Data Type" to show both Date and
Time in
the same field on a form.
 

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

Back
Top