Le 03/02/2012 05:41, Zach Smith a écrit : > The gb.GeneralDate formatting appears to be inconsistent in the > handling of time 00:00:00.. > > > Dim d1 As Date, d2 As Date, d3 As Date > > d1 = CDate("1/1/2003 00:00:00") > d2 = CDate("1/1/2003") > d3 = CDate("00:00:00") > > Print Format(d1, gb.GeneralDate) > Print Format(d2, gb.GeneralDate) > Print Format(d3, gb.GeneralDate) > > > Results in: > 01/01/03 > 01/01/03 > 00:00:00 > > Shouldn't the first line return this? > 01/01/03 00:00:00 >
Actually the third formatting is inconsistent. gb.GeneralDate prints the date part the short way (dd/mm/yy) and prints the time if it is not zero. But CDate("00:00:00") is a special value, the "null" date. It should print nothing, as IsNull(CDate("00:00:00")) = True. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user