|So you would think a SQL expert like me *ok you didn't have to laugh so loud* would already know this, but I didn't and got burnt.
SmallDateTime rounds seconds to the nearest minute. Fair enough. I didn't know but hey, we have DateTime so lets change the column datatype to that.
Only existing records are not affected. WTF! They act like the column is still a SmallDateTime. Manually adding in a second to the value doesn't help existing records either alas.
So I convert to NVarchar as a temporary hack and use GetDate. Charming, still no seconds. WTF!
So my question is; apart from recreating the whole column and loosing that data, how do I get what was a former SmallDateTime and is now a DateTime to store seconds on existing rows?
I am sure this is one of those Design Features too.
Christopher Duncan wrote:
"I always knew that somewhere deep inside that likable, Save the Whales kinda guy there lurked the heart of a troublemaker..."
Crikey! ain't life grand?