If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > DATEDIFF but don't count sat/sun

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-09, 16:21
Muiter Muiter is offline
Registered User
 
Join Date: Dec 2008
Location: Netherlands
Posts: 56
DATEDIFF but don't count sat/sun

The code below works perfect but I only want to count the working days, so nu saturday and sunday. Any ideas how to do this?
Code:
<?php
DATEDIFF(IFNULL(lp0.datum_betaald,NOW()),lp0.datum_te_betalen) 
  AS 
  aantal_dagen
?>
I did find DateDiff That Only Counts Working Days but now we are 6 years later so there might an good solution right now.

Last edited by Muiter; 01-20-09 at 16:25.
Reply With Quote
  #2 (permalink)  
Old 01-20-09, 22:10
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
this solution looks simple enough.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On