Highlighted
Respected Contributor.
Respected Contributor.
133 views

date format

Jump to solution

Hello.

I use Russian language interface SMAX. The date format is set to dd/mm/yyyy. When I converting a date to a string using the function format (%variable%, 'short_date'), I get the value of the string in the format 'm/dd/yy'. I do not like it. How can I get the 'dd/mm/yyyy' format. 

Could you provide an example of using the format function with all attributes ?

Thank you

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello,

The timezone can be configured globally in the Administration > Application Settings, the parameter is called Time zone definition. If you configure it here, you don't need to set it in the rule (unless you want to override the default. At the same time here you can see the list of timezones.

Here are the supported locales:

English(US)=en
English(UK)=en-GB
Arabic=ar
Brazilian Portuguese=pt-BR
Danish=da
Dutch=nl
French=fr
German=de
Greek=el
Italian=it
Japanese=ja
Korean=ko
Norwegian=nb
Polish=pl
Russian=ru
Simplified Chinese=zh-CN
Spanish=es
Swedish=sv
Turkish=tr

 

Best regards,

Brindusa

View solution in original post

4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello,

The date/time format is dependent on the locale/language used. If you don't specify it explicitly in the function, the English-US will be used.

Best regards,

Brindusa

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

OK

Could you give an example of using the format function with locale/language attributes ?

Thank you for advice

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

I did some experiments and based on a list of locales I found in:

https://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes

You can for instance try:

${concat('<p>',format(entity.EmsCreationTime,'short','en-GB','Europe/London'),' vs. ',format(entity.EmsCreationTime,'short','de-DE','Europe/Berlin'),'</p>')}

Result: 14/05/20 15:41 vs. 14.05.20 16:41

I didn't find a definitive list of locales and time-zones (even though I expect this to be Java based).

So I have sent a message to the documentation team to elaborate the valid values.

Regards,

Ben

Micro Focus Professional Services
Bracknell
UK
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello,

The timezone can be configured globally in the Administration > Application Settings, the parameter is called Time zone definition. If you configure it here, you don't need to set it in the rule (unless you want to override the default. At the same time here you can see the list of timezones.

Here are the supported locales:

English(US)=en
English(UK)=en-GB
Arabic=ar
Brazilian Portuguese=pt-BR
Danish=da
Dutch=nl
French=fr
German=de
Greek=el
Italian=it
Japanese=ja
Korean=ko
Norwegian=nb
Polish=pl
Russian=ru
Simplified Chinese=zh-CN
Spanish=es
Swedish=sv
Turkish=tr

 

Best regards,

Brindusa

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.