1) Enter 5/6/2017 into A1 and A2 initially formatted as General
2) Observe the Excel converted both to Date as mm/dd/yyyy
3) Apply Custom format of dd/mm/yyyy to A2
4) Observe the display change to 6/5/2018 -- looks good, doesn't it?
5) Enter =A1 and =A2 into B1 and B2
6) Format B1 and B2 as d-mmm
7) Observe both read 6-May!!!
Of course it does! What were you expecting?
If you format all the cells as Text, you'll see that the underlying DateSerial
for the value entered is 43226 (May 6, 2018). It doesn't matter how you format
it to display because the DateSerial drives the result. My point is *why
deliberately use an ambiguous format* to display dates given the issue? This is
what my exercise demos!
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion