(imported topic written by arpotu91)
Hello,
I’m trying to compare two dates recast as strings, and I’m getting unexpected results.
Here’s the truncated “current date”:
q: following text of first " " of (current date as string)
A: 04 Jun 2009
T: 0.048 ms
I: singular substring
… and the date I want to compare against:
q: "01 " & current month as string & " " & (current year as string)
A: 01 June 2009
T: 0.080 ms
I: singular string
But, when I compare the two (notice I changed the "01 " to "04 "), they don’t match:
q: if (following text of first " " of (current date as string) = ("04 " & current month as string & " " & current year as string)) then (TRUE) else (FALSE)
A: False
T: 0.105 ms
I: singular boolean
I would expect that boolean to evaluate to TRUE, since the strings match.
Ideas? Do I need to recast the substring as a string (which would be odd)?
Thanks,
Arpotu.