long date

  • Thread starter Thread starter Sammie
  • Start date Start 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
 
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".
 
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!
 
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.
 
Back
Top