Date printout problem

M

Mark R

On my report, I need the date to have leading zeroes when
necessary;always have two digits in the MM DD.
I currently get 1/4/2004 and 11/2/2002
I want it to print as 01/04/2004

I thought using an expression of some sort in the Query
that supplies the report might work. For instance I
currently append ID to A_Data

ID & A_Data AS COMBOID

and I print COMBOID on the report rather than the fields
separately.

I tend to use short date formats. One particular field in
question is Xdate:

format: short date
Input Mask: 99/99/00
default: Now()
REQUIRED FIELD

The text box input mask property on the form is
99/99/0000;0;

P.S. Can I change the format on the table definition to
match the form's property, Or will I mess up the table?
(the data in the table is currently just test data.
 
R

Rick B

To format a date on your report, use the format function. If you are
formatting it as a "short date" then it will use the short date format you
have built in your Windows Control Panle Regional Settings. Go into the
regional settings and select the appropriate "short date" format to show the
leading zeros.

The field on your report (if using an unbound text box) would look something
like...


=Format([SomeFieldName], "short date")




Rick B

On my report, I need the date to have leading zeroes when
necessary;always have two digits in the MM DD.
I currently get 1/4/2004 and 11/2/2002
I want it to print as 01/04/2004

I thought using an expression of some sort in the Query
that supplies the report might work. For instance I
currently append ID to A_Data

ID & A_Data AS COMBOID

and I print COMBOID on the report rather than the fields
separately.

I tend to use short date formats. One particular field in
question is Xdate:

format: short date
Input Mask: 99/99/00
default: Now()
REQUIRED FIELD

The text box input mask property on the form is
99/99/0000;0;

P.S. Can I change the format on the table definition to
match the form's property, Or will I mess up the table?
(the data in the table is currently just test data.
 
M

Mark R

"short date" ....will use the short date format you
have built in your Windows Control Panle Regional
Settings.

#1
------
How do you find and go into the Windows Control Panel
regional settings?


(if using an unbound text box)

#2
--------
Do you mean you have to have underlying VBA code for
unbound text boxes?
=Format([SomeFieldName], "short date")
 
J

John Vinson

I tend to use short date formats.

So you're getting exactly what you ask for: the Windows default short
date format.

Instead, use an explicit format of

mm/dd/yyyy

It will now show the leading zeros.
 
M

mark r

Instead, use an explicit format of
mm/dd/yyyy


So how do you specify such an "explicit format" ?

Do I yell at the screen?
Do I type these symbols into the format property?
do I put it quote marks "mm/dd/yyyy"
do I capitalize everyother one ""MM/dd/YYyy"
do I go into regional settings?
do I ask someone else?
 

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