Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Interestingly enough, I seem not to have had that need in all those years - but -

does SQL Anywhere provide names for day of week and month only in English?

Apparently, DAYNAME() and MONTHNAME() or DATEFORMAT(..., ' MMMM ') return English names only.

asked 16 Mar '20, 07:28

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

edited 17 Mar '20, 15:50

1

I wish that all of SQL Anywhere's localization capabilities were available to SQL code to enable simple translations; e.g., server messages.

(16 Mar '20, 15:50) Breck Carter

The only way to do that is to switch the "language" of the database server using the DBLANG tool.

> dblang de
> dbeng17 demo.db

select dayname(current timestamp)
Dienstag

dblang -? will show you all of the supported languages (all 14 of them).

permanent link

answered 17 Mar '20, 10:12

JBSchueler's gravatar image

JBSchueler
3.3k41564
accept rate: 19%

Ah, my bad. I run our servers with the default English locale because system messages and the like are better documented and probably easier to communicate in support cases...


But I notice - somewhat contrary to your statement -, that I can use the LANG connection parameter to get localized names even when the server runs the English locale. At least using LANG=DE within DBISQL returns "Dienstag", too, as desired. And there are also the property('Language') resp. connection_property('Language') for further diagnosis of the server resp. client language...

I'm somewhat embarrassed that I have not thought of the Golden Rule ...

(17 Mar '20, 11:25) Volker Barth
Replies hidden
1

Now my bad. My brain must be getting a bit rusty. You are quite correct that the client can use the Language (LANG) connection parameter.

(17 Mar '20, 12:12) JBSchueler
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×25
×24
×11

question asked: 16 Mar '20, 07:28

question was seen: 1,064 times

last updated: 17 Mar '20, 15:50