> I'm using this to print a formatted date: > > Draw.Text("Date and Time: " & CDate(Server.DateCurrent) & " (" & > Format$(CDate(Server.DateCurrent), "hh:nn:AM/PM") & ")", 32, ystart - 1) > > It seems that Format$ actually changes the value of Server.DateCurrent, > making it AM when it should be PM. Format$ is actually forcing the hour > to be between 1 and 12. Shouldn't Format$ simply return a value and not > overwrite the expression?
Format$() does not change its arguments, as any other functions in Gambas. When AM/PM is specified, the hour is displayed between 1 and 12. If the real hour is greater or equal than 12:00, then PM is printed. Otherwise AM is printer. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense.. http://p.sf.net/sfu/splunk-d2d-c1 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user