Created
November 27, 2012 11:30
-
-
Save dflima/4153790 to your computer and use it in GitHub Desktop.
Convert int to datetime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Convert int to datetime with this script. | |
| -- If anyone has a better or a more beautiful method, please, feel free to fork and change it. :) | |
| declare @i as int | |
| select @i = 20121029 --aaaammdd | |
| select convert(datetime, convert(char(8), @i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment