View Single Post
  #35   Report Post  
Posted to microsoft.public.excel.programming
dpb dpb is offline
external usenet poster
 
Posts: 109
Default Check how date is entered

On 5/7/2018 3:19 PM, malone wrote:
....

But what amazes me is that we persist in using these two date formats -
d/m/y and m/d/y. It seems absurd we accept conventions that are
blatantly so ambiguous! And, especially, their continuing use by
software engineers who are expected to think logically. I'm always
coming across applications or data where I have to struggle to work out
which is being used.

d/m/y and m/d/y are not formally internationally accepted date formats
and I'm surprised that there hasn't been a trend towards a more rational
format, such as yyyy-mmm-dd. The very least is a format where the
elements have increasing or decreasing significance - unlike m/d/y which
is neither.


No, but we 'Murricuns aren't much given to having others tell us what to
do; note the similar reluctance for widespread adoption of metric for
common use; after nearly 40 yr since was a widespread attempt to
enforce, it's still gotten essentially nowhere outside industrial and
scientific circles and I suspect another 40 will be about the same.

Date convention in US is a similarly ingrown habit; that there are
coding standards is pretty-much immaterial to the casual user and I'd
venture 70-80% of the spreadsheets in use are done by just that type of
individual; may be pretty adept at the usage of Excel interface and all,
but little or no actual coding training so they continue to just use
everyday convention.

As noted in an earlier response, in a 40-yr+/- consulting career in
mostly data acq and instrumentation for power utilities I saw a hundred
or more data acq systems put together from probably over half that many
vendors and every conceivable form and some that were truly incredible
for encoding date and time was in the sample set I think. As noted,
even vendors would (and I'm sure still do) provide sample code most
probably put together by the summer intern that would think something as
sophisticated of deliberately using the sequence order of d/m/y as
almost revolutionary and, probably, "European". Teaching those folks
about serial numbers is a struggle that one rarely wins.

As noted, Matlab has a class |datetime| and has enhanced the C i/o
format string to read date strings such that one can on a case-by-case
basis handle it on input. MS tends to also be heavy-handed in they code
as if everything is MS-consistent and leave it up to the user to conform
or write the glue to interact.

--