macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: How to find first and last day of previous month?.

Subject: Re: How to find first and last day of previous month?.
From: "cf_dev2"
Date: Wed, 8 Aug 2007 16:29:25 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
<cfset today = now()>
 <cfset firstOfThisMonth = createDate(year(today), month(today), 1)>
 <cfset lastOfNextMonth  = dateAdd("d", -1, dateAdd("m", 2, firstOfThisMonth))>

 <cfoutput>
 today = #today#<br>
 firstOfThisMonth = #firstOfThisMonth#<br>
 lastOfNextMonth = #lastOfNextMonth#<br>
 </cfoutput>


<Prev in Thread] Current Thread [Next in Thread>