> -----Original Message-----
> From: Orlini, Robert [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 14, 2006 11:46 AM
> To: CF-Talk
> Subject: RE: Yesterday in now()
> 
> Thank you all the suggestions were fine.
> 
> I need to explain myself more clearly though. I have a search by date form
> that lists the date like this:
> <cfloop index="i" from="1" to="#daysinmonth(today)#">
> 
> Today is: <cfset today = now()>
> 
> I would like it to start with yesterday or better yet the first of the
> month to widen the search possibilities
> 
> How can I set today to be the first day not the current day of the month?

You should be able to do this with "DayOfMonth()" and "DateAdd()" functions
(using negative values as other's have shown).

Do you know that all CF documentation is available free online at:

http://Livedocs.macromedia.com

I think if you'll scan the date/time functions section you'll be pleasantly
surprised at how complete it is.

I spent my first month with CF 2.0 building date functions for ridiculous
things already covered in the function library.  I just don't like to other
making my mistakes.  ;^)

The best thing any CF programmer can do is to read at least the name and
description of every tag and function in the language.  You'll be amazed at
well it sticks.

Jim Davis




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235340
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to