Link to home
Start Free TrialLog in
Avatar of Mik Mak
Mik Mak

asked on

Where to find NLS API setting for firstweekofyear

In Access VBA function DateDiff- the firstweekofyear parameter can be set to vbUseSystem - but where can I check what the NLS API setting is set to ?
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

You can use this expression:

DayOfWeek = 1 + (Weekday(Date, vbSunday) - Weekday(Date, vbUseSystemDayOfWeek) + 7) Mod 7

Open in new window

If, say, it is Monday, the result will be 2, the numeric value of vbMonday.
Avatar of Mik Mak
Mik Mak

ASKER

Maybe I don't understand you correct :) - But im not looking for the first day of the week - it's the firstweekofyear set in the NLS
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mik Mak

ASKER

Thank you for the ISO function - but I was actually looking for a some way to "read" the NLS API setting  on the current system - I have som differences running on different systems - but the ISO way could be a way of streamlining it I guess :)
Avatar of Mik Mak

ASKER

Thank you very much for the fast and excellent responses
You are welcome!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mik Mak

ASKER

Excellent ! - thank you very much !
Thanks. Have a nice day.