I am developing in an environment that is using UK datetime format on the webserver, but American datetime format on the database. As you can imagine, this is causing problems. I can not change the setup of either in the immediate future so i am looking for workarounds.
The soluton is to use the "ISO DateTime format" as reccomended in the following article: http://www.4guysfromrolla.com/webtech/tips/t022202-1.shtml
So i gave this a go using the following predicate to construct my query:
PredicateFactory.CompareValue(ClubFieldIndex.LicenseToDate, ORM.ComparisonOperator.GreaterThan, DateTime.Today.ToString("yyyy-MM-dd"));
this results in the following SQL
SELECT ... WHERE ( [Club].[LicenseToDate] < 2005-12-20 )
However, this does not work because single quotes are needed round the date. So finally, my question is this:
Is there a way to force the ISO date output in the sql query to have single quotes? If not, does anyone have any other suggestions?
Thanks for any help