I believe the dates are not being correctly formatted to work for all cultures by CAML.Net (there not working for me with en-nz culture) - I think perhaps the correct behaviour would be to have the date output in ISO8601 format by the CAML.Value(DateTime
dt) method using code like this (which comes from U2U Caml Query Builder):
private static string CreateISO8601DateTimeFromSystemDateTime(DateTime date)
return string.Format(CultureInfo.InvariantCulture, date.ToString("yyyy-MM-ddThh:mm:ssZ"), new object);
I'm having to use this function at the moment in combination with the 2 parameter overload of CAML.Value i.e. CAML.Value("DateTime", CreateISO8601DateTimeFromSystemDateTime(date)) to get reliable query results, but it would be nice to get this as
the default behavior.