An input mask restricts how data is entered into the database when someone is
typing it in. A format is how it's displayed. Do you want people to type in
something like 102320070445 into the field or do you what "102320070445" to
show up as 10/23/2007 04:45 ?
The next questionis what data type is the field in question? Probably not a
date/time field, therefore it could be number or text. If number the same
date minus a month would look like 92320070445 and have one fewer character
displayed as numbers don't have leading zeros.
I'm going to assume, and we all know what that means, that 102320070445 is
stored in a text field and you want it to look like a date. Unfortunately
none of the stardard date formats will work. Therefore I think it best to use
the Left and Mid functions to extract the parts of a data and make it look
like a date. In as query it would look something like:
TheDate: Left([YourDateField],2) & "/" & Mid([YourDateField],3,2) & "/" &
Mid([YourDateField],5,4) & " " & Mid([YourDateField],9,2) & ":" &
Mid([YourDateField],11,2)
If you want to treat the above results like an actual date, you could wrap
it in the CDate function.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
Beagle said:
Hello,
I need to create an Input Mask for the following:
Current Data shows: 102320070445
Desired result is: 10/23/2007 04:45
Not sure how to use the "add" input mask feature. What needs to go in the
following input mask fields when using the Customize Input Mask Wizard:
Description:
Input Mask:
Placeholder
Sample Data:
Mask Type:
Thanks,
Beagle