Convert date into int changes the value

gregorious

New member
Joined
Sep 24, 2013
Messages
1
Reaction score
0
Points
0
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).
Thanks
 
Back
Top