Re: Get the last 12 months transactions?
Try this SELECT fields FROM table WHERE date = (Now()-365) 365 days in year??? Daryl Fullerton, Managing Partner, BizNet Solutions, Allaire Premier Partner (Ireland) 133 - 137 Lisburn Road Belfast BT9 7AG Ireland Direct +44 (0) 28 9022 7888 Tel +44 (0) 028 9022 3224 Fax +44 (0) 028 9022 3223 [EMAIL PROTECTED] Http://www.BizNet-Solutions.com [EMAIL PROTECTED] (Chairman) Http://www.cfug.ie The Irish Cold Fusion User Group - Original Message - From: fr me [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, November 30, 2000 3:59 PM Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get the last 12 months transactions?
Wouldn't this tell you whether the date is in the NEXT 12 months... neverending 12 months, I might add? Try something like this: SELECT fields FROM table WHERE date = #DateAdd("m", 12, Now())# ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Get the last 12 months transactions?
Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Get the last 12 months transactions?
Try this cfquery name="transactions" datasource="whatever" select * from table where date #DateAdd("m", -12, Now())# /cfquery Does anyone know how to test that a date is in the last 12 months? _ ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get the last 12 months transactions?
Take the current date. Subtract 12 months from it Select all records that are greater than the result Brandon Behrens Developer Momentum Software http://www.momentumsoftware.com 512.236.1517 -Original Message- From: fr me [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 9:59 AM To: CF-Talk Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get the last 12 months transactions?
CFIF DateDiff("", Now(), datevariablepassed) LT 1 the date variable is within one year of now. CFELSE the date variable is older than one year /CFIF By te way, A less efficient way of doing this, which is more flexible in that you don't have to be testing for a date within an interval of now (i.e. you could specify a range) might look something like this: CFSET tempdate = DateAdd("", 1, Now()) CFIF DateDiff("d", Now(), tempdate) GT DateDiff("d", Now(), yourdatevariable) The date variable occured within the last 12 months CFELSE this date is Greater han one year old /CFIF ~Simon Simon Horwith Certified ColdFusion Developer Fig Leaf Software 1400 16th St NW, # 220 Washington DC 20036 202.797.6570 (direct line) www.figleaf.com -Original Message- From: fr me [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 10:59 AM To: CF-Talk Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get the last 12 months transactions?
-Original Message- From: fr me [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 10:59 AM To: CF-Talk Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? Try something like this: SELECT fields FROMtable WHERE date = #DateAdd("m", 12, Now())# HTH, Duane Boudreau Director of Web Technologies Ektron, Inc. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get the last 12 months transactions?
You can use DateDiff() -Original Message- From: fr me [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 7:59 AM To: CF-Talk Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get the last 12 months transactions?
Or if you want to do it in SQL, use the BETWEEN operator -Original Message- From: fr me [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 7:59 AM To: CF-Talk Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Get the last 12 months transactions?
CFIF DateYouWantToTest GTE DateAdd('', '-12', DateYouWantToTest) If the date you are testing if the date is greater than or equal to last year (substitute your favorite operator as needed) Gregory Harris Web Developer Stirling Bridge Group LLC - Original Message - From: "fr me" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Thursday, November 30, 2000 7:59 AM Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Get the last 12 months transactions?
Something like cfif (DateDiff("m",Now(),MyDate) LT) 0 AND (DateDiff("m",Now(),MyDate) GT -12) -- Billy Cravens [EMAIL PROTECTED] fr me wrote: Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Get the last 12 months transactions?
Check out the function dateDiff() -Original Message- From: fr me [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 9:59 AM To: CF-Talk Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Get the last 12 months transactions?
Yes. CFSET today = Now() This gives you today CFSET olddate = #DateAdd(d,-365, today)# This will give a date 365 days before today CFSET IsOlder = #DateCompare(olddate, yourdatetocompare, d)# If your date is older than a year the datecompare function will return 1. - Original Message - From: "fr me" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Thursday, November 30, 2000 9:59 AM Subject: Get the last 12 months transactions? Does anyone know how to test that a date is in the last 12 months? _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists