View Single Post
  #2  
Old April 13th, 2010, 04:50 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default date+time input mask

You need to understand the Microsoft date format. Dates are Doubles ("with
an attitude" IOW, just any Double won't necessarily work) Zero (0) is
December 30, 1899. The integer portion of the double (actually more
appropriately called a long) or portion to the left of the decimal which
counts the number of days since 12/30/1899. The decimal portion (to the
right of the decimal point) is the time portion. So .5 is noon, .75 is 6:00
PM, etc..

No matter how you enter the date, it will store it that way. So just make
sure that both date and time are entered, and use the format property to
display it the way you want. Any input mask that you use must be matched
from the table. So if you are using a General Date, change it in the table.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"cloclo via AccessMonster.com" u56862@uwe wrote in message
news:a66e7bfdff019@uwe...
Hi,
I have a textbox where I'd like users to input date and time in the
format:
mm/dd/yyyy hh:mm AM (or PM).

My input mask is: 00/00/0000\ 00:00\ LL

The format is General Date.

The column this textbox is bound to on the table is date/time with format
of
General Date.

When I input a date and time, I'm getting an error. I input 03/31/2010
01:
15 AM. When I tab off the field, I get the following message: "The value
you
entered isn't valid for this field".

What am I doing wrong?

thanks.
CLO

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201004/1