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 19,023 of 19,505   
   andy.mcvicker@siemens.com to All   
   Advanced DateDiff Calculation In SQL (ex   
   03 Mar 14 12:35:04   
   
   Hi Everyone   
      
   I have an odd question for SQL   
      
   I'm trying to do a calculation on 2 date fields.  I'd like to get the exact   
   difference in time between 2 dates but I don't want to include any time if the   
   duration falls over a weekend.  For example, find me the difference in time   
   with the following but    
   don't include any time after Friday at midnight to Sunday at midnight.   
      
   StartDate = 03/14/2014 12:09:00pm   
   EndDate = 03/17/2014 09:24:00am   
      
   Or even more seemingly complex...   
      
   StartDate = 03/14/2014 12:09:00pm   
   EndDate = 03/24/2014 09:24:00am   
      
   Best Regards,   
   Andy   
      
   --- 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