RSS Forums RSS
Please support our ColdFusion advertiser: Programming Forums

Posting News according to today's date

Join Date: Jul 2005
Posts: 8
Reputation: fbalangue is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
fbalangue fbalangue is offline Offline
Newbie Poster

Posting News according to today's date

  #1  
Jul 26th, 2005
I would like to create a page which will pull news items according to today's date. What I have is a database which users input thier news information. But now I need to have the information output to a page which will change daily according to the current date. The BeginDate fields and EndDate fields are in date format in my database. Here's what I have to work with...

<!---Retrieve news from database--->
<cfquery name="NewsQuery" datasource="News">
SELECT *
FROM News
WHERE BeginDate <= '#Dateformat(Now(), "mm/dd/yyyy")#'
AND EndDate >= '#Dateformat(Now(), "mm/dd/yyyy")#'
</cfquery>

<!---Output news to page--->
<cfoutput query="NewsQuery">
<p>
#NewsTitle#
#NewsDesc#
#NewsDate#
</p>
</cfoutput>

Anything specific you can provide me with is greatly appreciated. Please provide me some code... I've been working on trying to get this to work for weeks!

Thanks for your help!!! :eek: :mrgreen:
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:41 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC