On 4/25/00, Ryan Shrout penned:
>I have a news database, and I want to create quicklinks for news viewing =
>by day.  I know I can get the current date from the server and use that =
>in a query, but how can I get YESTERDAY'S date?  I can't simply subtract =
>one, because of the month changes... Is there any CF workaround for =
>this? =20


I don't know what you mean by can't subtract 1. Cold Fusion is smart 
enough to know that if today is the 1st of April, -1 is 31. Or if 
it's the 1st of March, -1 is 29 if it's a leap year, 28 otherwise. :)


#dateadd('D', -1, now())#

To show in date format:

#dateformat(dateadd('D', -1, now()), "MMM/D/YYYY")#


Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to