Ask Your Question

Revision history [back]

reading the date acceptance pattern & local setting

I've just publicly released an LibreOffice multi-platform, OS independent LibreOffice BASE/Writer application. I developed it using LO Version: 4.4.6.3 and OSX 10.10.5. With the exception of OSX 10.11(theres an outstanding bug report) it runs on all Windows, OSX & Linux/Ubuntu systems very well.

However it fell over when my first US user tried to run it because my development platform defaults to a Locale setting of English (UK) and a Date acceptance pattern of D/M/Y;D/M;D-M. The application failed when it was attempting to coerce a a string field that was "19/01/2016" using the Cdate function to a date. I'm assuming that his system defaulted to the US Date acceptance pattern of M/D/Y;M/D;M-D and that's why it failed.

My questions is

How can I retrieve (using a macro) the local date acceptance pattern & locale setting? So that I might be able to prevent this happening.

And does anyone have any advice for handling dates information e.g. date last modified dates of files, sorting records asc. & desc. by date, best format to hold date information in a database so that I can cope with any local date format preference.

Second question:

Can I, via a macro, re-set the date acceptance pattern to the ISO standard date format YYYY/MM/DD and do you think this would be acceptable (it would certainly be a lot less confusing) ?

reading the date acceptance pattern & local setting

I've just publicly released an LibreOffice multi-platform, OS independent LibreOffice BASE/Writer application. I developed it using LO Version: 4.4.6.3 and OSX 10.10.5. With the exception of OSX 10.11(theres an outstanding bug report) it runs on all Windows, OSX & Linux/Ubuntu systems very well.

However it fell over when my first US user tried to run it because my development platform defaults to a Locale setting of English (UK) and a Date acceptance pattern of D/M/Y;D/M;D-M. The application failed when it was attempting to coerce a a string field that was "19/01/2016" using the Cdate function to a date. I'm assuming that his system defaulted to the US Date acceptance pattern of M/D/Y;M/D;M-D and that's why it failed.

My questions is

How can I retrieve (using a macro) the local date acceptance pattern & locale setting? So that I might be able to prevent this happening.

And does anyone have any advice for handling dates information e.g. date last modified dates of files, sorting records asc. & desc. by date, best format to hold date information in a database so that I can cope with any local date format preference.

Second question:

Can I, via a macro, re-set the date acceptance pattern to the ISO standard date format YYYY/MM/DD and do you think this would be acceptable (it would certainly be a lot less confusing) ?

reading the date acceptance pattern & local setting

I've just publicly released an LibreOffice multi-platform, OS independent LibreOffice BASE/Writer application. I developed it using LO Version: 4.4.6.3 and OSX 10.10.5. With the exception of OSX 10.11(theres an outstanding bug report) it runs on all Windows, OSX & Linux/Ubuntu systems very well.

However it fell over when my first US user tried to run it because my development platform defaults to a Locale setting of English (UK) and a Date acceptance pattern of D/M/Y;D/M;D-M. The application failed when it was attempting to coerce a a string field that was "19/01/2016" using the Cdate function to a date. I'm assuming that his system defaulted to the US Date acceptance pattern of M/D/Y;M/D;M-D and that's why it failed.

My questions is

How can I retrieve (using a macro) the local date acceptance pattern & locale setting? So that I might be able to prevent this happening.

And does anyone have any advice for handling dates information e.g. date last modified dates of files, sorting records asc. & desc. by date, best format to hold date information in a database so that I can cope with any local date format preference.

Second question:

Can I, via a macro, re-set the date acceptance pattern to the ISO standard date format YYYY/MM/DD and do you think this would be acceptable (it would certainly be a lot less confusing) ?