A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

date+time input mask



 
 
Thread Tools Display Modes
  #1  
Old April 12th, 2010, 07:25 PM posted to microsoft.public.access.forms
cloclo via AccessMonster.com
external usenet poster
 
Posts: 3
Default date+time input mask

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

  #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



  #3  
Old April 15th, 2010, 04:37 PM posted to microsoft.public.access.forms
cloclo via AccessMonster.com
external usenet poster
 
Posts: 3
Default date+time input mask

Hi,
For anyone else with this issue, here is the mask that finally worked:
99/99/0000\ 99:00:00\ LL;0;_
use it in good health.

cloclo wrote:
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

  #4  
Old April 15th, 2010, 04:38 PM posted to microsoft.public.access.forms
cloclo via AccessMonster.com
external usenet poster
 
Posts: 3
Default date+time input mask

thank you Arvin, for the response.

Arvin Meyer [MVP] wrote:
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.
Hi,
I have a textbox where I'd like users to input date and time in the

[quoted text clipped - 19 lines]
thanks.
CLO


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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.