View Full Version : Convert date into int changes the value

2013-09-24, 12:56 PM
I'm pulling the data from SQL database. I have few Datetime columns which need to be converted into Int type, but when I do this the date changes (-2 days). I tried Cast and Convert and it's always the same.
Converting to other type works fine and returns the correct date.

Why is this happening? Any ideas how to get it sorted? Int seems to be the only format that works for me (need to be recognised as a date by Excel and not contain time element).