how can i display dates that are less than 1 week and equals to date now in mysql?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jegar j
    New Member
    • May 2012
    • 8

    how can i display dates that are less than 1 week and equals to date now in mysql?

    select assignTitle,due Date from tblAssignment where dueDate=CONVERT (Date,GETDATE() ,113)
  • India777
    New Member
    • Apr 2012
    • 61

    #2
    Use >= and <= in where Condition

    select assignTitle,due Date from tblAssignment where dueDate >=CONVERT(Date, dateadd(d,-7,GETDATE()),11 3) and <=Convert(Date, GetDate(),113);

    Comment

    Working...