I have an issue with certain cultures (Spanish in particular), causing the date string, ToShortDateString(), to come in as dd/mm/yyyy
where END_DATE between '" + asOfDate.AddDays(-30).ToShortDateString() + "' and '" +
This is causing SQL sever errors because we get incorrect date literal strings such as this:
where END_DATE between '17/05/2015' and '16/06/2015'
What is the best way to force the date format to be mm/dd/yyyy in these cases, where I am building a SQL statement?