long date

S

Sammie

I can't control the long date format as "mmm d yyyy" on one of 4
computers. I have set a control containing a date to the "long date"
format. On three computers, when I look at the format pop-down box,
long date shows as March 18, 2005. On the fourth computer, the pop-down
box shows the long date as Friday, March 18, 2005. How can I change the
definition of long date on the fourth computer to show the date without
the day-of-week? I have tried formatting the control on the report as
Format([DateCreated] = "mmm d yyyy")
but it will not change on my printed report.
Any help will be appreciated.
Sammie
 
R

Rick Brandt

Sammie said:
I can't control the long date format as "mmm d yyyy" on one of 4
computers. I have set a control containing a date to the "long date"
format. On three computers, when I look at the format pop-down box,
long date shows as March 18, 2005. On the fourth computer, the
pop-down box shows the long date as Friday, March 18, 2005. How can I change
the definition of long date on the fourth computer to show the date[snip]

You don't. When you used a named format like "Long Date" you are effectively
saying that you want the format to honor the local PC's Regional Settings. If
you want a certain format regardless of Regional Settings then use an explicit
format string, not a named format. In your case you would use "mmm d yyyy" as
the format property setting instead of "Long Date".
 
S

Sammie

Rick said:
Sammie said:
I can't control the long date format as "mmm d yyyy" on one of 4
computers. I have set a control containing a date to the "long date"
format. On three computers, when I look at the format pop-down box,
long date shows as March 18, 2005. On the fourth computer, the
pop-down box shows the long date as Friday, March 18, 2005. How can I change
the definition of long date on the fourth computer to show the date[snip]


You don't. When you used a named format like "Long Date" you are effectively
saying that you want the format to honor the local PC's Regional Settings. If
you want a certain format regardless of Regional Settings then use an explicit
format string, not a named format. In your case you would use "mmm d yyyy" as
the format property setting instead of "Long Date".
Thanks. I changed the long date format in Regional Settings and the
problem is solved!
 
D

Douglas J. Steele

Sammie said:
Rick said:
Sammie said:
I can't control the long date format as "mmm d yyyy" on one of 4
computers. I have set a control containing a date to the "long date"
format. On three computers, when I look at the format pop-down box,
long date shows as March 18, 2005. On the fourth computer, the
pop-down box shows the long date as Friday, March 18, 2005. How can I
change
the definition of long date on the fourth computer to show the date[snip]


You don't. When you used a named format like "Long Date" you are
effectively saying that you want the format to honor the local PC's
Regional Settings. If you want a certain format regardless of Regional
Settings then use an explicit format string, not a named format. In your
case you would use "mmm d yyyy" as the format property setting instead of
"Long Date".
Thanks. I changed the long date format in Regional Settings and the
problem is solved!

While that may have solved your immediate problem, note that it will change
how the date is displayed for every application on that machine. Perhaps the
user in question wanted the date format in question. As developers, we have
an obligation to respect the settings the users have chosen. In my opinion,
Rick's approach was far more appropriate.
 

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