XModPro

Datetime issues with database collation

Rune Kildahl Bentsen Rune Kildahl Bentsen asked May 13, 2015
Active May 13 · Viewed 2134 times
<p>Hi XModders</p><p>This is actually not directly linked to XMOD itself, it's more of a SQL issue, but I really hope you guys can help me anyways.</p><p>I'm using XMOD for a calendar based on full calendar for one of our customers, and so far it's been working flawlessly.&nbsp;</p><p>However, I've recently had to recreate the entire DNN installation from scratch, manually copying everything from the old installation to the new (please don't ask why).</p><p>Part of the transfer is the XMOD data, and everything seems to work correctly.. until I found a really horrible difference.</p><p>My old DB is based on the Collation Danish_Norwegian_Cl_AS.</p><p>My new DB is based on Collation&nbsp; <p>SQL_Latin1_General_CP1_CI_AS<br>(I think it's the standard for a new DB in SQL Server)</p></p><p>I know it's a REALLY stupid thing to do, and a bad day to find out more than a month after transfers, but I guess I just have to deal with it.</p><p>Now to my problem. It seems the collation change also affects the datetime format in the DB - which includes sorting order and valid formats for datetime in forms, etc.</p><p>Does anyone know if it's possible to simply change the collation of a DB without causing a whole heap of bugs?</p><p>Would anyone know a nice and easy way to get around this collation and datetime format change? It's affecting other modules as well (but at least it's not affecting the DNN installation itself).</p><p>I've tried to add the format="dd-mm-yy" in my datepickers in XMOD, but I can't get it to work. When dates are fetched from DB, they're shown in standard american "mm/dd/yyyy H:MM:ss tt" which is what I think my DB will expect as datetime format now :(</p>

1 Answer

Loading answers...