Hi, It's me again. Andreas Saeger wrote: > Eike Rathke wrote: >>> Both return the same ISO date-string of a number in A1. >>> Can I take English format codes for granted with all locales? >> Yes, for the TEXT function English date format codes do work with all >> locales. >> > > Sorry, I found an inconsistancy with this feature: > =TEXT(A1;"YYYY-MM-DD") works just fine > =TEXT(A1;"YYYY-MM-DD HH:MM:SS") returns "YYYY-03-DD 08:17:40" > > It needs to be > =TEXT(A1;"JJJJ-MM-TT HH:MM:SS") > with German locale. > > May I file an issue?
Not shure if this is related to the TEXT function issue, but there seems to be something wrong with a similar API function. REM ***** BASIC ***** Sub Main d = 38541.173 oNumberFormatter = createUnoService("com.sun.star.util.NumberFormatter") oNumberFormatter.attachNumberFormatsSupplier(ThisComponent) oLocale = createUnoStruct("com.sun.star.lang.Locale") oLocale.Language = "de" oLocale.Country = "DE" msgbox oNumberFormatter.convertNumberToPreviewString ("YYYY-MM-DD HH:MM:SS", d, oLocale, TRUE) end sub The message box reports "YYYY-07-DD 04:09:07". If I understand convertNumberToPreviewString correctly, the last boolean argument allows for English format strings. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]