Change Date Format
By default, GoodData displays the date attributes in the en-US
format.
You can enable a different date format for your organization, workspace, or even for individual users. Date attributes are then displayed in the format that you select.
You can select from the following predefined date formats based on the ICU standard: Chinese, Czech, Dutch, English (GB), English (US), French, German, Japanese, Portuguese (Brazil), Portuguese (Portugal), Russian, Spanish.
Settings hierarchy
Unless you set a specific date format for a workspace or a user, the settings are inherited from their parents:
- Workspaces inherit the settings from their parent entity, i.e. parent workspace or organization.
- Users inherit the date format settings from their workspaces.
Change the Date Format
To change the date format:
- Create the
formatLocale
setting. - Enable the format that you want to use.
The following table shows the IDs that you can use to enable the date formats:
Format | Format ID |
---|---|
Chinese | zh-CN |
Czech | cs-CZ |
Dutch | nl-NL |
English GB | en-GB |
English US (default) | en-US |
French | fr-FR |
German | de-DE |
Japanese | ja-JP |
Portuguese (Brazil) | pt-BR |
Portuguese (Portugal) | pt-PT |
Russian | ru-RU |
Spanish | es-ES |
Note
If you use an invalid format ID, en-US
will be used instead.
Organization
To change the date format for the whole organization, follow these instructions:
To create the formatLocale
organization settings, send the following POST request /api/v1/entities/organizationSettings
:
curl $ENDPOINT/api/v1/entities/organizationSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer {API_TOKEN}" \
-X POST \
-d '{
"data":
{
"type": "organizationSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | jq .
To enable a different date format, send the following PUT request /api/v1/entities/organizationSettings/formatLocale
:
curl $ENDPOINT/api/v1/entities/organizationSettings/formatLocale \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer {API_TOKEN}" \
-X PUT \
-d '{
"data":
{
"type": "organizationSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | jq .
To create the formatLocale
organization settings, send the following POST request /api/v1/entities/organizationSettings
:
Invoke-RestMethod -Method Post -Uri '$ENDPOINT/api/v1/entities/organizationSettings' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{
'Accept' = 'application/vnd.gooddata.api+json'
'Authorization' = 'Bearer {API_TOKEN}'
} `
-Body '{
"data":
{
"type": "organizationSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | ConvertTo-Json
To enable a different date format, send the following PUT request /api/v1/entities/organizationSettings/formatLocale
:
Invoke-RestMethod -Method Put -Uri '$ENDPOINT/api/v1/entities/organizationSettings/formatLocale' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{
'Accept' = 'application/vnd.gooddata.api+json'
'Authorization' = 'Bearer {API_TOKEN}'
} `
-Body '{
"data":
{
"type": "organizationSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | ConvertTo-Json
Workspace
To change the date format for individual workspaces, follow these instructions:
To create the formatLocale
workspace settings, send the following POST request /api/v1/entities/workspaceSettings
:
curl $ENDPOINT/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer {API_TOKEN}" \
-X POST \
-d '{
"data":
{
"type": "workspaceSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | jq .
To enable a different date format, send the following PUT request /api/v1/entities/workspaceSettings/formatLocale
:
curl $ENDPOINT/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings/formatLocale \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer {API_TOKEN}" \
-X PUT \
-d '{
"data":
{
"type": "workspaceSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | jq .
To create the formatLocale
workspace settings, send the following POST request /api/v1/entities/workspaceSettings
:
Invoke-RestMethod -Method Post -Uri '$ENDPOINT/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{
'Accept' = 'application/vnd.gooddata.api+json'
'Authorization' = 'Bearer {API_TOKEN}'
} `
-Body '{
"data":
{
"type": "workspaceSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | ConvertTo-Json
To enable a different date format, send the following PUT request /api/v1/entities/workspaceSettings/formatLocale
:
Invoke-RestMethod -Method Put -Uri '$ENDPOINT/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings/formatLocale' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{
'Accept' = 'application/vnd.gooddata.api+json'
'Authorization' = 'Bearer {API_TOKEN}'
} `
-Body '{
"data":
{
"type": "workspaceSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | ConvertTo-Json
User
To change the date format for individual users, follow these instructions:
To create the formatLocale
user settings, send the following POST request /api/v1/entities/userSettings
:
curl $ENDPOINT/api/v1/entities/users/{USER_ID}/userSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer {API_TOKEN}" \
-X POST \
-d '{
"data":
{
"type": "userSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | jq .
To enable a different date format, send the following PUT request /api/v1/entities/userSettings/formatLocale
:
curl $ENDPOINT/api/v1/entities/users/{USER_ID}/userSettings/formatLocale \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer {API_TOKEN}" \
-X PUT \
-d '{
"data":
{
"type": "userSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | jq .
To create the formatLocale
user settings, send the following POST request /api/v1/entities/userSettings
:
Invoke-RestMethod -Method Post -Uri '$ENDPOINT/api/v1/entities/users/{USER_ID}/userSettings' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{
'Accept' = 'application/vnd.gooddata.api+json'
'Authorization' = 'Bearer {API_TOKEN}'
} `
-Body '{
"data":
{
"type": "userSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | ConvertTo-Json
To enable a different date format, send the following PUT request /api/v1/entities/userSettings/formatLocale
:
Invoke-RestMethod -Method Put -Uri '$ENDPOINT/api/v1/entities/users/{USER_ID}/userSettings/formatLocale' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{
'Accept' = 'application/vnd.gooddata.api+json'
'Authorization' = 'Bearer {API_TOKEN}'
} `
-Body '{
"data":
{
"type": "userSetting",
"id": "formatLocale",
"attributes": {
"content": {"value": "{FORMAT_ID}"}
}
}
}' | ConvertTo-Json