You mean you want to get yesterdays date? 

Sounds like you've been trying to subtract 1 from the date, since your
having problems if the date is on the 1st.

Try using DateAdd()

So if your date is march 1st.
<cfset yourdate = "03/01/2001">

User DateAdd to subtract 1 day.
<cfset yesterday = DateAdd("d",-1,yourdate)>

And output it with dateformat.
<cfoutput>#DateFormat(Variables.yesterday,"mm/dd/yyyy")#</cfoutput>

_____________________________
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: Joel Blanchette [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 28, 2002 3:11 PM
To: CF-Talk
Subject: Date Function


Hello All,
        Here is a good one.  I have been thinking about this for a while
and I can not figure it out!

I am doing a schedule thing and I need to see if let's say at the time
it goes, if we are the 1st of the month to get yesterday's date.  So I
cab take that and format it with dateformat

Does anyone know how this would be accomplished?

Thanks,

Joel


______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to