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 18,731 of 19,505   
   Gene Wirchenko to lichunshen84@gmail.com   
   Re: what's going on with datediff functi   
   30 Aug 12 14:04:11   
   
   e3c08bed   
   From: genew@ocis.net   
      
   On Thu, 30 Aug 2012 12:34:56 -0700 (PDT), justaguy   
    wrote:   
      
   >-- task: find records / rows where createddate is 8/23/2012   
   >   
   >select *   
   >from myTBL   
   >and datediff(dy,createddate,'8/23/2012') <1   
   >   
   >-- change parameter from dy to d does not help neither   
   >What's wrong?   
   >   
   >DBMS in question: MS SQL Server 2005 Express   
      
        datediff() can return negative values.   
      
   Sincerely,   
      
   Gene Wirchenko   
      
   --- 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