MySQL Forums
Forum List  »  Newbie

Re: Interval time from two dates
Posted by: Peter Brawley
Date: June 15, 2019 10:08AM

Simplify ...

SELECT
    DAYOFWEEK(dStart) AS DOW,
    Time( dStart ) as timeStart,
    Time( dEnd ) as timeEnd,
    cd
FROM `2019tblCd`
WHERE cd = 'P'
      AND DAYOFWEEK(dStart) BETWEEN 2 AND 6
      AND Time( dStart ) >= '06:00:00' 
      AND Time( dEnd ) <= '08:00:00' 
ORDER BY dStart DESC LIMIT 10;

Options: ReplyQuote


Subject
Written By
Posted
Re: Interval time from two dates
June 15, 2019 10:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.