By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,902 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

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

P: 8
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);

Share this Question
Share on Google+
1 Reply


India777
P: 61
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.