Calculating datediff using current date and a date column in mysql database

I’m current using Visual Studio 2010 to work on my application. I have encountered a problem regarding calculating the date difference in days using the current date and eventdate column in my database.

This is what I’m going to show the user.

If the text in dropboxlist = recent, events 7 days from current date will be shown in gridview.

I do not know the correct SELECT Statement to use.

Any ideas?

Thanks in advance

How are you retrieving the records from the database? Straight up ADO or Linq to Sql or EF?

also, please confirm you are accessing oracle’s mysql database (the forum you posted in)

I’d assume MSSQL as this was moved from .NET, possibly mistakenly.

then it got moved to the wrong forum

I could be wrong though. I see it says MYSQL in the thread title but I don’t remember it being specified previously. :slight_smile: