Hello all,

Using the following

         cfset olddate = DateFormat(DateAdd("d", -30, Now()))

works as expected.

What's odd is the original code was written like this:

         cfset olddate = DateFormat(DateAdd("d", Now(), -30))

This didn't produce an error, either in the cfset, or in the query where
'olddate' was used.

Both formats return 3/25/2000.

>From the docs, the correct syntax is DateAdd(datepart, number, date), as in
the first example.

Am I missing something here?



---------------------
Jeff Beer
Programmer
Hydrogen Media, Inc.
www.hydrogenmedia.com
Phone:  888.890.9175
Fax:  727.530.5588



------------------------------------------------------------------------------
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