[Gambas-user] [Gambas Bug Tracker] Bug #1266: ValueBox with Type=date automatically adds 1900/2000 for dates in first century

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Wed Mar 14 19:32:40 CET 2018


http://gambaswiki.org/bugtracker/edit?object=BUG.1266&from=L21haW4-

Comment #2 by T. Lee DAVIDSON:

I tried that way too, Benoît, and experienced the same issue. So, I thought setting by .Text would be more explicit since I could format the years with prepended zeros.

Public Sub Form_Open()

  ValueBox1.Value = Date(100, 1, 1)
  ValueBox2.Value = Date(99, 1, 1)
  ValueBox3.Value = Date(30, 1, 1)
  Print ValueBox1.Value
  Print ValueBox2.Value
  Print ValueBox3.Value

End

produces:
01/01/100 00:00:00
01/01/1999 00:00:00
01/01/2030 00:00:00

T. Lee DAVIDSON changed the state of the bug to: Opened.




More information about the User mailing list