Last post Jan 13, 2007 10:14 AM by wandrson
Jan 12, 2007 01:09 PM|wandrson|LINK
When adding a news article one of the fields is the date and time for the article. The form states that the article will only be available to the public after this date/time.
I've just started populating the news/events tables and noticed that this behavior doesn't seem to be working. The home page displays all of the news items--even those whose date is at some point in the future.
Jan 13, 2007 10:14 AM|wandrson|LINK
I found a solution to this problem. I'm posting it for anyone else who wants to correct the behavior.
Change the SqlDataSource1 Data source Select Command from:
SELECT top 5 [id], [itemdate], [title], [description], [photo] FROM [Announcements] order by itemdate desc
SELECT top 5 [id], [itemdate], [title], [description], [photo] FROM [Announcements] WHERE ([itemdate] > GETDATE()) order by itemdate desc