Home Forums SQL Server 2005 T-SQL (SS2K5) convert from MM/DD/YYYY to YYYYMMDD RE: convert from MM/DD/YYYY to YYYYMMDD
Lynn Pettis
SSC Guru
Points: 442467
More actions
October 22, 2007 at 4:29 pm
#744268
Can we ask why you need to do this?
Also, this should work: select year(getdate()) * 10000 + month(getdate()) * 100 + day(getdate())
Replace getdate() with your column name.
😎