[Gambas-user] IsDate(string) - how good is it?
Gianluigi
bagonergi at gmail.com
Thu Jan 6 13:16:26 CET 2022
Il giorno gio 6 gen 2022 alle ore 12:45 Benoît Minisini <g4mba5 at gmail.com>
ha scritto:
>
>
> 'IsDate(xxx)' internally uses 'Val()' algorithm to convert the string to
> a date, and returns FALSE if it fails.
>
> Regards,
>
> --
> Benoît Minisini
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
So it's a bug?
Private hGrid As GridView
Public Sub Form_Open()
Dim hPan As HBox
Dim hButton As Button
Dim hDate As Date
hGrid = New GridView(Me) As "GridView1"
With Me
.H = 512
.W = 512
.Arrangement = Arrange.Vertical
.Margin = True
End With
With hGrid
.Expand = True
.Header = GridView.Horizontal
.Rows.Count = 1
.Columns.Count = 1
.Columns[0].Title = "DATE"
End With
hDate = Date(Now)
hGrid[0, 0].text = Format(hDate, "dd/mmm/yyyy")
hGrid.Columns.Width = -1
With hPan = New HBox(Me)
.h = 40
End With
With hButton = New Button(Me) As "Button1"
.h = 40
.AutoResize = True
.Text = "CLICK HERE"
End With
End
Public Sub Button1_Click()
Print IsDate(hGrid[0, 0].Text) ' <---------FALSE!
End
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220106/26da3743/attachment.htm>
More information about the User
mailing list