468,541 Members | 1,740 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,541 developers. It's quick & easy.

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

select assignTitle,dueDate from tblAssignment where dueDate=CONVERT(Date,GETDATE(),113)
May 21 '12 #1

✓ answered by India777

Use >= and <= in where Condition

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

1 1676
Use >= and <= in where Condition

select assignTitle,dueDate from tblAssignment where dueDate >=CONVERT(Date,dateadd(d,-7,GETDATE()),113) and <=Convert(Date,GetDate(),113);
May 21 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by David Olsen | last post: by
3 posts views Thread by Tim Chase | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.