Date/Time

C

Chris

I have a bound form and one of my text boxes is pointing to a a date/time
field. Whenever this value goes in the time is appended. I have set the
format to = shortdate and added the correct input mask. I am seting the
value on the textbox to = date. and the time is appended. When I make the
textbox unbound the time is not appended. So I'm thinking it must be the
table. I have added shortdate into the table and I'm still getting the time
appended.

Why is this happening?
 
W

Wayne Morgan

What time are you seeing appended? A date only field will have a time of
midnight. A date/time value is stored as a floating point number. The
integer portion is the number of days since the base date and the decimal
portion is the time of day stored as a fraction of the day (i.e. .0 is
midnight, .25 is 6am, .5 is noon, etc). Since all integers have a decimal
value of 0, midnight is assumed to be the time when you have a date only. If
you're seeing a time other than this, then there is something you've set
that is generating the time.

Please show the input mask and the full line of code you're using to assign
the value to the textbox. Have you set a Default Value in the control's
properties or the field's properties in the table?
 
R

Rick B

A date time field always stores the date and time. You can select to SEE
only the date or the time, but both are stored.

This entry is stored as a numeric entry where a portion is the date and a
portion is the time.

If you do not specify a time, I believe midnight is used.
 

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

Top