home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,661 of 19,505   
   Plamen Ratchev to All   
   Re: how to convert int to datetime   
   06 Oct 09 17:26:54   
   
   ac4c09b2   
   From: Plamen@SQLStudio.com   
      
   If this is YYYYMMDD, then it is very simple, just cast to character format and   
   then to date:   
      
   SELECT CAST(CAST(20010101 AS CHAR(8)) AS DATETIME)   
      
   You can delete like:   
      
   DELETE FROM Foo   
   WHERE date < '20051231';   
      
   --   
   Plamen Ratchev   
   http://www.SQLStudio.com   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca