Re: IsDate()

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Wed, 13 Jun 2007 21:57:31 -0500, Bart Perrier wrote:

I am working with an HTA, having the user enter a numeric value for the
MONTH / DAY / YEAR. I then concatenate them into the format shown and then
do an IsDate(). If the user enters something like 14 / 2 / 2007, IsDate
returns True; it is reading the date as DAY / MONTH / YEAR.

Any idea how I can get around this without using DropDowns?

Thanks.
Bart

Hi Bart,

If your using a HTA the regional settings of the client using the HTA are
going to apply, if you use DateSerial to concatenate the values into a
valid date then use IsDate() this should work.

Usage:[return] Date = DateSerial([year] integer, [month] integer, [day]
integer)

Because you decide what is the year the month and the day, any regional
settings will not screw up your conversion.

Hope this was helpful.
--
Martin Dobson
Furness Internet Limited (http://www.furness.net)
VBCity Leader (http://www.vbcity.com/forums)
.



Relevant Pages

  • Re: Binary v. Text, why is it faster?
    ... reading textual data. ... But watch what happens when I concatenate two copies together: ... EOF character per file and it better be the last one. ...
    (comp.programming)
  • Re: IsDate()
    ... I then concatenate them into the format shown and then ... it is reading the date as DAY / MONTH / YEAR. ... FAQish topics, links, acronyms ...
    (microsoft.public.scripting.vbscript)
  • Which is a better method to concatenate large blocks of text?
    ... In a Windows Form application, which is the better method to concatenate ... Reading the text from text files. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • IsDate()
    ... I am working with an HTA, having the user enter a numeric value for the ... I then concatenate them into the format shown and then ... Bart ...
    (microsoft.public.scripting.vbscript)
  • Re: Python serial data aquisition
    ... > My problem is to how to recover my reading from these bytes, ... > how to throw away the unneeded bits and concatenate the remaining ... HTH. ...
    (comp.lang.python)