My website is hosted on multiple servers at different locations
Everywhere the Culture of the data format is different- we use mm/dd/yyyy
format every w
Never rely on the server's default locale. For your case, this means:
Use prepared statements where you pass the date as (unformatted) date object and not as (formatted) string object. You should never use strings to represent dates in your application anyway, as you cannot perform date-specific functions on them (like adding 1 month, getting the last day of the current week, etc.)
Use SQL functions like to_date
and to_char
everywhere (exact names depend on your DBMS), if you really need to use string objects in your application