View Single Post
  #36   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Check how date is entered

On 8-May-2018 6:53 am, dpb wrote:
On 5/7/2018 12:06 PM, GS wrote:
...

If the source data is indeed StringText then you're at the mercy of Excel
interpreting as per system date format and the resulting ambiguity. Using
textual date formats ("May 05, 2018") will ALWAYS display correctly
because Excel will indeed treat them as text. (ergo not useable in
formulas by direct ref to the cell)

...

Yes, but sometimes with foreign systems one doesn't have the ability to
change the output form...sad, but ime, more often than one would think,
still all too true for specialty systems from a hardware vendor or the like
that are just simple prepackaged demos of how to use the system but also
ime, probably 70-80% of the clients would never have written a better tool
for their purpose but instead just make do with the toy sample from the
vendor and live with the warts.

Been burnt too many times.... :(

--


slightly off topic..

I've been following this thread and have learned things that will help when I
encounter date problems in excel and VBA which I often do.

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.


Well stated!
My preference is yyyy-mmm-dd (1st) or mmm-dd-yyyy (2nd) for legal purposes,
otherwise mmm-dd or dd-mmm for storing date values. In all cases the 3 char
month abbreviation is used. Using yyyy in the 1st element position (yyyy-mm-dd)
just makes sense for sorting purposes, IMO:)

Thankfully, most development languages use DateSerial and offer text formatting
options as to how the developer wants that to be displayed. But as you state, I
can't understand why they persist to use an ambiguous format; - after all, it's
not like they don't know how systems they develop for work!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion