Home Forums SQL Server 2008 T-SQL (SS2K8) Convert DateTime to MMDDYY RE: Convert DateTime to MMDDYY
jcdyntek
Ten Centuries
Points: 1153
More actions
January 7, 2010 at 11:22 am
#1100392
SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 1), '/', '') AS [MMDDYY]]
you would need to replace GETDATE() function with your date field. This will display as
010710.
Are the leading zeros a problem?