Sometimes, we want to program somethings that talk, learn and express...
Wednesday, March 18, 2009
SQL upcoming date
if you want to get the up coming listing such as event you can do a SQL query like this:
SELECT EventID, EventName, StartDate, EndDate, EventTime, EventLink FROM Events WHERE (StartDate BETWEEN GETDATE() AND GETDATE() + 45) AND (GETDATE() BETWEEN StartDate AND EndDate + 1) ORDER BY StartDate
1 comment:
Thanks for this publish. I find it hard to track down good answers out there when it comes to this subject matter. Thanks for the review!
Post a Comment