> That makes perfect sense and was the expected behavior. I'm not sure > what's happening here, but this test code: > > Public Sub Main() > > Dim t As Float > > t = CFloat(Now) ' Current time and date. > > Print "1: CDate(t): " & CDate(t) > Print "2: Format$(CDate(t), \"hh:nn:AM/PM\"): " & Format$(CDate(t), > "hh:nn:AM/PM") > Print "3: CDate(t): " & CDate(t) > Print "4: Format$(CDate(t), \"hh:nn:AM/PM\"): " & Format$(CDate(t), > "hh:nn:AM/PM") > Print "5: CDate(t): " & CDate(t) > > End > > Produces these results: > > 1: CDate(t): 06/25/2011 18:35:46.837 > 2: Format$(CDate(t), "hh:nn:AM/PM"): 06:35:PM > 3: CDate(t): 06/25/2011 06:35:46.837 > 4: Format$(CDate(t), "hh:nn:AM/PM"): 06:35:AM > 5: CDate(t): 06/25/2011 06:35:46.837 > > I checked, and the value of variable "t" is not being changed. However, > after the first Format$, CDate(t) returns a different value than before > the first Format$. Any idea why? Lines 1 and 2 look good, but it seems > like lines 1 and 3 should print the same value. Somehow the Format$ line > continues to have an effect on the subsequent lines. > > I hope I'm really not so stupid that I'm missing something obvious. I'm > not even drinking right now!
Mmm... You're right, there's something nasty there. I'm currently investigating... -- Benoît Minisini ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user