Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Have I missed something?

0 views
Skip to first unread message

Stephen Bowyer

unread,
Jan 23, 2001, 5:20:16 PM1/23/01
to
I've just realised that the date validation in my app doesn't work. An
entry such as 31/04/01 (I use the British dd/mm/yy format) in a text box
returns IsDate = True! What's going on?
Have I missed something?

TIA.

Steve


Chip Pearson

unread,
Jan 23, 2001, 6:02:19 PM1/23/01
to
Steve,

VB and Dates have a few strange quirks. I generally don't trust the IsDate
function at all. IsDate is treating "31/04/01" as a yy/mm/dd format, and it
converts to 1-April-1931. "IsDate" should really be renamed to
"IsItPossibleToRearrangeThisStringToGetSomeSortOfDate".

It is a rather crappy function. Roll your own.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com ch...@cpearson.com


"Stephen Bowyer" <stephen...@btinternet.com> wrote in message
news:94l07r$a4b$1...@plutonium.btinternet.com...

Jan Hyde

unread,
Jan 25, 2001, 11:36:58 AM1/25/01
to
"Stephen Bowyer" <stephen...@btinternet.com>'s wild
thoughts were released on Tue, 23 Jan 2001 22:20:16 -0000
bearing the following fruit:

From the help

'IsDate Function

Returns a Boolean value indicating whether an expression can
be converted to a date.'

It is true that 31/04/01 can be converted to a date

01/04/31
04/01/31

That's the way I look at it anyway.

J


0 new messages