Monday, May 28, 2007

Don't use WeekdayName in Access

Avoid using the function WeekdayName() because it can give inconsistent results.

In the Immediate window I looked for the name of vbSunday and it returns måndag (Monday in Swedish).

? WeekdayName(vbSunday)

WeekdayName() uses vbUseSystemDayOfWeek and that can change depending on how you have set Windows to behave.

Workaround using either Format() or Weekday() since they use vbSunday as default value for the first day of the week or you can select what day should be the first day of the week.

This is a problem or bug even in the latest Microsoft Access 2007.

No comments:

Post a Comment

Subscribe to the comments feed

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner

Contact Us | About JTB World | Subscribe to this blog
JTB World's website | Website General Terms of Use | Privacy Policy
^ Top of page

© 2004- JTB World. All rights reserved.