Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2008
    Location
    Netherlands
    Posts
    58

    Unanswered: 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 http://www.dbforums.com/microsoft-sq...king-days.html but now we are 6 years later so there might an good solution right now.
    Last edited by Muiter; 01-20-09 at 17:25.

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    this solution looks simple enough.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •