Locale - date formatting

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
perherman
Posts: 20
Joined: Thu Nov 23, 2017 10:41 am
Contact:

Locale - date formatting

Post by perherman »

Hi
I have created a locale: SE, and set the default date and timestamp format in accordance with the Swedish standard as follows:

yyyy-mm-dd or yyyy-MM-dd

When I enter date of birth as 13th of May 1956, this shows in the form as 1956-00-13

Why is this? How do I change this so it shows correctly?

If I change to dd-MM-yyyy it shows 13-05-1956, but this is not the correct Swedish order.

Thanks

Per-Olof
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Locale - date formatting

Post by joben »

Hi fellow Swede :)

We use this locale setting in our apps:
Skärmbild 2023-05-03 094143.png
Skärmbild 2023-05-03 094143.png (30.47 KiB) Viewed 3216 times
Capital MM is important. MM is month, mm is minutes.
Regards, Joakim

Image
perherman
Posts: 20
Joined: Thu Nov 23, 2017 10:41 am
Contact:

Re: Locale - date formatting

Post by perherman »

Hi and thanks!

I tried that, but it did'nt work

But I will try again,

best

Per-Olof
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Locale - date formatting

Post by joben »

Maybe you have to change to a different date and hit Save for the month part to kick in.
Also make sure that the attribute is inheriting from the locale and not using its own individual setting.

If you don't get it to work, feel free to attach the .bsv here in a zip file and I will have a look.
Regards, Joakim

Image
perherman
Posts: 20
Joined: Thu Nov 23, 2017 10:41 am
Contact:

Re: Locale - date formatting

Post by perherman »

Thanks,
I got it working, but I hade to "manually" change the attribut to Format: (Take from locale).

Why did it not inherit it from my settings?
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Locale - date formatting

Post by joben »

Glad you got it working!

This is actually a good question. The default format has always been MM/dd/yyyy for me when creating a new date attribute. I have just changed it to "(take from locale)" and never thought more about it.
But now I discovered that this behavior can actually be changed so that "(take from locale)" becomes the default!
If you double click your current Business Space Version, there should be an option called "Default date/timestamp formats" in the right panel.
lokal1.png
lokal1.png (84.04 KiB) Viewed 3190 times
lokal2.png
lokal2.png (31.48 KiB) Viewed 3190 times
I don't know when this was introduced, but I have completely missed it 8)
Regards, Joakim

Image
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Locale - date formatting

Post by PointsWell »

joben wrote: Thu May 04, 2023 6:26 am
I don't know when this was introduced, but I have completely missed it 8)
https://www.awareim.com/dokuwiki/doku.p ... provements

V8.8 build 3123
perherman
Posts: 20
Joined: Thu Nov 23, 2017 10:41 am
Contact:

Re: Locale - date formatting

Post by perherman »

Thanks Joben,

thas solves it I think!

best
Per-Olof
Post Reply