View Single Post
  #24   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 5/6/2018 8:03 PM, GS wrote:
On 5/6/2018 7:37 PM, GS wrote:
...

So docs done on pre-Vista systems would still show correct dates when
opened in the later OSs because regardless of how the system format
displays, the DateSerial dictates the actual date value!

That's ok for stuff already _in_ MS product; what about the question of
importing data from external systems that may have different encoding
between them?* Looks like that's broken to me...


Hmm.., I guess you're talking about dbase date formats and AFAIK these also
use DateSerial; - but then that only applies to MS-based or Windows-based
dbases. I haven't run into any issues using generic dbases like SQLite,
though, but then never did the XP/Vista+ testing thing with that. I do know
the dates are correct in my stuff because I set the format to always use
the 3-char month abreviation. (Suggests date values univerally use
DateSerials to be cross-OS compatible!)


No, the issue of text from two disparate systems; one encoded as mm/dd/yyyy
and the other dd/mm/yyyy. AFAICT, there's no way other than to have to
recode to match the system default to get the one not matching to be
interpreted correctly. That's just rude...


Actually, your example isn't textual dates; - they're numeric! This is where
the problem lies. A2 in my exercise is an example of textual date format; - it
doesn't matter what the system format is because that format will ALWAYS
display correctly.

--
Garry

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