Beware of TEXT() date expressions on devices with non-English OS

Tip:  If your users may be using devices with operating systems in languages other than English, you may want to avoid relying on convenient TEXT() date expressions and build expressions manually in order to insure that your dates appear correctly on all devices.


Today I learned that if I have the OS of my Android phone set to Japanese, TEXT([Date_column], "MMMM") is rendered "1ๆœˆ" instead of "January" on that device. A similar issue occurs on my iPhone but, amazingly, it depends on the context: Sometimes it's "1ๆœˆ" and sometimes it's "January," even though the OS is set to Japanese. On my Mac using Chrome, it's consistently "January," even if I have the OS set to Japanese.

For me, this is a problem. I want the user to be able to choose the language within app so automatically switching dates to Japanese is a problem. Moreover, since word order is different between English and Japanese, the automatic swithing just makes nonesense dates like "1ๆœˆ 16, 2023" which is neither proper English nor correct Japanese.

The inability to rely on TEXT() documentation (https://support.google.com/appsheet/answer/10107701?hl=en) is a problem for me. I have to make up complicated expressions like the following to make sure I get the equivalent of TEXT([Date_column], "H:MM AM/PM"), which should be something like 7:32 PM (not 7:32 ๅˆๅพŒ):

 

CONCATENATE(INDEX(SPLIT(TEXT([Date_column], "H:MM AM/PM")," "),1),IF(NUMBER(TEXT([Date_column], "HH")) < 12," AM"," PM"))

 

I'm hoping that the good people at AppSheet can resolve this problem but I'm not waiting. I'm avoiding convenient TEXT() expressions designed for English (name of month, day of the week, AM/PM, etc.) and making complicated expressions that I can be sure will work as I imaged on all devices, even though they are harder to write.

@Fabian_Weller @Koichi_Tsuji @Suvrutt_Gurjar 

1 1 133
1 REPLY 1

Thanks for the tip. I was not aware of it.

Top Labels in this Space