Validating Dates

J

JE McGimpsey

????

I get

?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Feb/02/2002

or

?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Feb/03/2006

depending on which Date system I'm using, but nothing like what you
got...
 
N

Norman Jones

Hi JE,

I have retried all thee dates in the intermediate window and, as you
correctly point out, the first of the three returns: Feb/03/2006 (on my
system).

I ran my date checks and then played with them whilst writing the post,
with the result you highlight.

Thank you for the correction.

---
Regards,
Norman



JE McGimpsey said:
????

I get

?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Feb/02/2002

or

?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Feb/03/2006

depending on which Date system I'm using, but nothing like what you
got...


Norman Jones said:
?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Mar/06/2005
 
J

JE McGimpsey

The biggest issue for me is that the example you gave evaluates an XL
function that depends on the user's Date System setting, without
checking that setting. That can lead to significant errors.

I see it all the time when people write code that assumes that the user
will be using the 1900 date system.

Norman Jones said:
I have retried all thee dates in the intermediate window and, as you
correctly point out, the first of the three returns: Feb/03/2006 (on my
system).

I ran my date checks and then played with them whilst writing the post,
with the result you highlight.

Thank you for the correction.

---
Regards,
Norman



JE McGimpsey said:
????

I get

?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Feb/02/2002

or

?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Feb/03/2006

depending on which Date system I'm using, but nothing like what you
got...


Norman Jones said:
?format([date(2005,13.5,34)], "mmm/dd/yyyy")
Mar/06/2005
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top