David Smith

David Smith

  • NA
  • 2k
  • 0

SQL SERVER 2008 DATETIME CONVERSION FAILURE

Mar 13 2012 2:17 AM
this is giving me an error below , failed conversion, keep in mind the format thats in the database is 'YYYYMMDD:hhmmss' try this value '20111112:000000' can someone assist me


DELETE  
FROM Color
WHERE REPLACE(CONVERT(VARCHAR,Color.CreatedDateTime, 102),'.','/') +' '+ CONVERT(VARCHAR, Color.CreatedDateTime, 108) < (GETDATE()-30)

Answers (6)