Input Mask

G

Guest

How would I build an Input mask with the Date/Time Datatype that accetps the
military DTG format: DD HHMMZ MMM YY? The "Z" is a letter code for the time
zone and will never change from "Z". Thanks in advance.
 
G

Guest

Hi Philippe

This is untested so you may have to play around with it.

Create your Tim/Date field (DateField)
Create an unbound text box and set the control source to this


=Format([DateField],"DD") &"
"&Format([DateField],"HH")&Format([DateField],"MM")&"Z
"&Format([DateField],"MMM")&" "&Format([DateField],"YY")

This should give you DD HHMMZ MMM YY
Note the space after the Z in &"Z "&

Hope this helps
 
G

Guest

I got the format working from the design view of the table with the following
in the Format box: dd hhnn"Z "mmm yy. If I use a Built-in Input mask with
such as 99/99/00\ 99:00;0;_ The displayed value converts to the format as
desired. But when I am in a field it looks like this: __/__/__ __:__ and I
want it to look like this __ ____Z ___ __

Wayne-I-M said:
Hi Philippe

This is untested so you may have to play around with it.

Create your Tim/Date field (DateField)
Create an unbound text box and set the control source to this


=Format([DateField],"DD") &"
"&Format([DateField],"HH")&Format([DateField],"MM")&"Z
"&Format([DateField],"MMM")&" "&Format([DateField],"YY")

This should give you DD HHMMZ MMM YY
Note the space after the Z in &"Z "&

Hope this helps



--
Wayne
Manchester, England.



Philippe Perrault said:
How would I build an Input mask with the Date/Time Datatype that accetps the
military DTG format: DD HHMMZ MMM YY? The "Z" is a letter code for the time
zone and will never change from "Z". Thanks in advance.
 
G

Guest

You are going to have problems inserting text (Z) directly into a time/date
field - thats not the way they work in access. Press F1 and and search on
Inputmasks and you will see a list of seperators - Z is not one of them.

You would be best formating the the field as text then using the afterupdate
or onchange event of another (timedate) field to setvalue to your text field.

Use the control source I gave in the last post.


--
Wayne
Manchester, England.



Philippe Perrault said:
I got the format working from the design view of the table with the following
in the Format box: dd hhnn"Z "mmm yy. If I use a Built-in Input mask with
such as 99/99/00\ 99:00;0;_ The displayed value converts to the format as
desired. But when I am in a field it looks like this: __/__/__ __:__ and I
want it to look like this __ ____Z ___ __

Wayne-I-M said:
Hi Philippe

This is untested so you may have to play around with it.

Create your Tim/Date field (DateField)
Create an unbound text box and set the control source to this


=Format([DateField],"DD") &"
"&Format([DateField],"HH")&Format([DateField],"MM")&"Z
"&Format([DateField],"MMM")&" "&Format([DateField],"YY")

This should give you DD HHMMZ MMM YY
Note the space after the Z in &"Z "&

Hope this helps



--
Wayne
Manchester, England.



Philippe Perrault said:
How would I build an Input mask with the Date/Time Datatype that accetps the
military DTG format: DD HHMMZ MMM YY? The "Z" is a letter code for the time
zone and will never change from "Z". Thanks in advance.
 
G

Guest

I'v been giving this some thought, and I don't need the Z in the input mask.
I get that from the format. I just need the input mask to look like this __
____ ___ __ which is dd hhnn mmm yy.

Wayne-I-M said:
You are going to have problems inserting text (Z) directly into a time/date
field - thats not the way they work in access. Press F1 and and search on
Inputmasks and you will see a list of seperators - Z is not one of them.

You would be best formating the the field as text then using the afterupdate
or onchange event of another (timedate) field to setvalue to your text field.

Use the control source I gave in the last post.


--
Wayne
Manchester, England.



Philippe Perrault said:
I got the format working from the design view of the table with the following
in the Format box: dd hhnn"Z "mmm yy. If I use a Built-in Input mask with
such as 99/99/00\ 99:00;0;_ The displayed value converts to the format as
desired. But when I am in a field it looks like this: __/__/__ __:__ and I
want it to look like this __ ____Z ___ __

Wayne-I-M said:
Hi Philippe

This is untested so you may have to play around with it.

Create your Tim/Date field (DateField)
Create an unbound text box and set the control source to this


=Format([DateField],"DD") &"
"&Format([DateField],"HH")&Format([DateField],"MM")&"Z
"&Format([DateField],"MMM")&" "&Format([DateField],"YY")

This should give you DD HHMMZ MMM YY
Note the space after the Z in &"Z "&

Hope this helps



--
Wayne
Manchester, England.



:

How would I build an Input mask with the Date/Time Datatype that accetps the
military DTG format: DD HHMMZ MMM YY? The "Z" is a letter code for the time
zone and will never change from "Z". Thanks in advance.
 
G

Guest

If you don't need the Z (text) you can just use the datetime field "as is".
Just set the format to whatever you want and it should work OK.

The only reason you may have needed a "feeder" unbound box was due to you
wanting the "Z". If you don't then just set the format of the field dd hhnn
mmm yy as spaces will follow from this as they are classed as standard
seperators.

Good luck

--
Wayne
Manchester, England.



Philippe Perrault said:
I'v been giving this some thought, and I don't need the Z in the input mask.
I get that from the format. I just need the input mask to look like this __
____ ___ __ which is dd hhnn mmm yy.

Wayne-I-M said:
You are going to have problems inserting text (Z) directly into a time/date
field - thats not the way they work in access. Press F1 and and search on
Inputmasks and you will see a list of seperators - Z is not one of them.

You would be best formating the the field as text then using the afterupdate
or onchange event of another (timedate) field to setvalue to your text field.

Use the control source I gave in the last post.


--
Wayne
Manchester, England.



Philippe Perrault said:
I got the format working from the design view of the table with the following
in the Format box: dd hhnn"Z "mmm yy. If I use a Built-in Input mask with
such as 99/99/00\ 99:00;0;_ The displayed value converts to the format as
desired. But when I am in a field it looks like this: __/__/__ __:__ and I
want it to look like this __ ____Z ___ __

:

Hi Philippe

This is untested so you may have to play around with it.

Create your Tim/Date field (DateField)
Create an unbound text box and set the control source to this


=Format([DateField],"DD") &"
"&Format([DateField],"HH")&Format([DateField],"MM")&"Z
"&Format([DateField],"MMM")&" "&Format([DateField],"YY")

This should give you DD HHMMZ MMM YY
Note the space after the Z in &"Z "&

Hope this helps



--
Wayne
Manchester, England.



:

How would I build an Input mask with the Date/Time Datatype that accetps the
military DTG format: DD HHMMZ MMM YY? The "Z" is a letter code for the time
zone and will never change from "Z". Thanks in advance.
 

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