Created
May 14, 2015 21:20
-
-
Save clintmjohnson/3d80913903355dd14956 to your computer and use it in GitHub Desktop.
Usage #3 : Format Date from MMDDYYYY to MM/DD/YYYY
This file contains 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
DECLARE @MMDDYYYY VARCHAR(10) | |
SET @MMDDYYYY = '07042013' | |
SELECT STUFF(STUFF(@MMDDYYYY, 3, 0, '/'), 6, 0, '/') AS [MM/DD/YYYY] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DECLARE @mmddyyyy VARCHAR(10)
SET @mmddyyyy = '07042013'
SELECT STUFF(STUFF(@mmddyyyy, 3, 0, '/'), 6, 0, '/') AS [MM/DD/YYYY]
Output
07/04/2013