[Gambas-user] gb3: Format$

Kevin Fishburne kevinfishburne at ...1887...
Thu Jun 23 01:21:40 CEST 2011


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?

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271





More information about the User mailing list