
The equivalent SQL Server function is datepart, passing as parameters the date part you want, in this case weekday as 'dw' and the actual date On Mon, Aug 16, 2010 at 4:54 PM, Chris | Ronell Africa < chris@ronellafrica.com> wrote:
Dont know about mssql but in mysql there is a function like dayofweek
So select becomes
Select xxxxxx from abcd where x=y and y=z and dayofweek(datecolumn) not in (6,7)
*From:* Calvin Omari [mailto:calvinebarongo@gmail.com] *Sent:* 16 August 2010 1:58 p *To:* Skunkworks Forum *Subject:* [Skunkworks] MSSQL - getting time different excluding weekends
Hi, I am doing an ms sql select but i want to exclude week ends as i want am doing a different bewteen when a product was sold and when payment was done I need the diffrent between the sold date and paid date excluding weekends
Any idea is highly appreciated
Regards -- Our greatest fear is not that we are inadequate, but that we are powerful beyond measure. It is our light, not our darkness, that frightens us.
Calvin Omari Systems Developer/Designer http://www.facebook.com/barongo
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke