On 28/02/18 09:29, Mark Rotteveel wrote:
Should this be considered a bug, i.e., separators should be necessary in
this case (12-Mar-92, 12/Mar/92, 12.Mar.92)?

I'd consider ANY separator other than a space as an error when using text months. '12Mar92' is at least consistent when spaces and extras are stripped from the data such as '12th March 1992'

Common practice disagrees (although it may vary by geographic region!), dates like 12-MAR-92 are relatively common and are a compromise between human readability and machine parsability.

There are a vast range of 'common practice', most of which make it difficult to be 100% certain of a date without reference to other information ... replace MAR with 03 and the date becomes a little ambiguous ... 12th March or 3rd December?

Technically, the SQL Standard knows only one format, and that is (slightly simplified):

YYYY-MM-DD HH24:MI:SS.FF..+/-TZH:TZHM

While this is the 'standard' it has the same fundamental flaw that it's use in other standards has. It has no way of indicating if the OFFSET has a daylight saving element! It has always been wrong to use TZ as the description of the offset ... it IS only an offset.

Conversion of data and normalizing to UTC is relatively easy provided the day and month element is easy to identify, but identifying it's timezone rules is much like deciding if it's M-D-Y or D-M-Y :(

Timezone text is a considerably more complex problem than month text handling 
especially since even the TZ database can't agree on just what text to use. The 
only thing that is consistent is Time OFFSET which uses the '-' sign anyway as 
a flag.

A '+' or '-', not just a '-'.

My point was that '-' can be used as a separator and a flag ... in the same standard date.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to