> gb.GeneralDate prints the date part the short way (dd/mm/yy) and prints > the time if it is not zero.
The middle example is still inconsistent if one expects 00:00:00 to be a valid time, that is, midnight (12:00 AM). Also note that the format is mm/dd/yy only if the time is not 00:00:00. One can get around this by using a "mm/dd/yyyy hh:nn:ss" format string but having gb.GeneralDate work for all dates and times would be helpful. --------------------------------------------------- Dim d1 As Date, d2 As Date, d3 As Date d1 = CDate("12/31/2002 23:59:59") d2 = CDate("1/1/2003 00:00:00") d3 = CDate("1/1/2003 00:00:01") Print Format(d1, gb.GeneralDate) Print Format(d2, gb.GeneralDate) Print Format(d3, gb.GeneralDate) --------------------------------------------------- 12/31/2002 23:59:59 01/01/03 01/01/2003 00:00:01 ------------------------------------------------------------------------------ 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