# Setting the Server Locale for the WEEK and DAYOFWEEK Functions

**URL:** <https://community.cdata.com/t/setting-the-server-locale-for-the-week-and-dayofweek-functions/846>\
**Category:** CData Virtuality \[Archived\]\
**Tags:** article, cdata-virtuality\
**Created:** [July 12, 2024, 5:04pm UTC](https://community.cdata.com/t/setting-the-server-locale-for-the-week-and-dayofweek-functions/846 "2024-07-12T17:04:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@anonymous](https://community.cdata.com/u/anonymous)\
**Post date:** [July 12, 2024, 5:04pm UTC](https://community.cdata.com/t/setting-the-server-locale-for-the-week-and-dayofweek-functions/846/1 "2024-07-12T17:04:47Z")

</div>

Depending on the locale of the server’s operating system, the WEEK function used on a Sunday may return the next week, as Sunday is set as the first day of the week.

This can be tested with

> `SELECT WEEK('2014-01-05')`

which will return 1 on a German locale and 2 on a US locale.

In order to set Data Virtuality Server to the German locale, append the following line to standalone.conf.props.bat (Windows):

> `set "JAVA_OPTS=%JAVA_OPTS% -Duser.country=DE -Duser.language=de"`

On UNIX systems, append the following line to standalone.conf.props:

> `JAVA_OPTS="$JAVA_OPTS -Duser.country=DE -Duser.language=de"`
