<cf_warning>This is intended as humorous . . . but the code works; if you
can't handle humor, go back to work. :) </cf_warning>
This is the way a CF programmer from a "traditional" programming background
will tell you to do it . . .
<cfset date1 = createdate(2000,5,16)>
<cfset date2 = dateadd("d",180,date1)>
<cfoutput>
#dateformat(date1)#<br>
#dateformat(date2)#
</cfoutput>
Those of us who know how to program, but come from a Visual Basic background
will suggest . . .
<cfset date1 = "5/16/00">
<cfset date2 = date1 + 180>
<cfoutput>
#dateformat(date1)#<br>
#dateformat(date2)#
</cfoutput>
Ain't typeless data great! LOL . . . :)
Dan
-----Original Message-----
From: Jacob [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 12, 2000 11:53 AM
To: [EMAIL PROTECTED]
Subject: Find a date from a given date
How can I find the date 180 days from a give date?
For example, if I am given the date 05/16/00, I want to return the date of
11/16/00.
I have tried using DateDiff for a while, but I do not think it will work.
checkdate = 05/16/00
#evaluate(180 + DateDiff("d",now(),checkdate.odr_date))# gives me the
answer of 123, but I would like the date. Try variation of, but no luck.
Thanks in advance.
Jacob
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
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.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.