[Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3

Benoît Minisini gambas at ...1...
Wed Nov 24 23:52:29 CET 2010


> On Wednesday 24 November 2010 22:32:26 Benoît Minisini wrote:
> > > On Wednesday 24 November 2010 22:08:34 Benoît Minisini wrote:
> > > 
> > > Hi Benoit I use isDate() quite a lot, isNumber I think once
> > > 
> > > Regards
> > > richard
> > 
> > In which context exactly?
> 
> When I've got textboxes and user has entered what is meant to be a date,
> for example on the lost_focus event
> 

I mean which code. IsDate() only tells you if a variant is a Date. If you want 
to check that a string is a date, you have to do that:

dDate = Val(sTextBoxString)
If IsNull(dDate) Then 
  Print "Enter a date!"
Endif

-- 
Benoît Minisini




More information about the User mailing list