That was brilliant!

I just didn't see it at all :)

I set the scope to #variables.startdate# and it works now.
Oh wowee gee :)

Thank you very very much..I asked SO many people about this and they all
drew a complete blank ^_^.

Thanks much!

*slides her a warm blueberry muffin*
:)
*hops and skips back to CF-Community *

-Gel


-----Original Message-----
From: Dina Hess [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 12, 2002 10:53 AM
To: CF-Talk
Subject: Re: Going crazy! Dates acting insane..AIIIEEE!


<CFSET TheDate = StartDate> is inside loop over "getClients" query so
it's resetting the value of TheDate to getClients.StartDate each time it
loops over the query rs


----- Original Message -----
From: "Angel Stewart" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, September 12, 2002 9:37 AM
Subject: RE: Going crazy! Dates acting insane..AIIIEEE!


> Hi,
>
> This is the GetClients Query:
>
> <CFQUERY name="GetClients" datasource="#DSN#" >
>
> SELECT *
>
> FROM tblMaster
>
> WHERE
>
> tblMaster.startdate <= #enddate#
>
> AND tblMaster.startdate >= #startdate#
>
> AND tblMaster.empid = #client.empid#
>
> </CFQUERY>
>
> No field called TheDate....:-\
>
> -Gel
>
>
> -----Original Message-----
> From: Jerry Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 12, 2002 10:34 AM
> To: CF-Talk
> Subject: Re: Going crazy! Dates acting insane..AIIIEEE!
>
>
> The only thing I can see is that maybe there is a field in the 
> GetClients query called TheDate, and therefore the cfset for
thedate is
> being ignored/wrongly scoped?
>
> Jerry Johnson
>
> >>> [EMAIL PROTECTED] 09/12/02 09:58AM >>>
> <!--- DEBUG CODE --->
> <CFSET STARTDATE = #CreateODBCDate('9/01/2002')#>
> <CFSET ENDDATE = #CreateODBCDate('9/30/2002')#>
> <CFSET client.empid = 1>
> <!--- DEBUG CODE --->
>
> <td><CFOUTPUT>#startdate#</CFOUTPUT></td> [This CFOUTPUT shows
: {d
> '2002-09-01'} ]
> </tr>
> <CFSET TheDate = StartDate><!--- Set variable to the startdate
> ---><strong></strong>
> <CFLOOP query="GetClients">
> <CFSET TheDate = StartDate> 
> <tr><td><CFOUTPUT>#TheDate#</CFOUTPUT></td></tr> [BUT THIS CFOUTPUT 
> shows: 2002-09-08 00:00:00] <td> 
> <CFOUTPUT>#GetClients.offtime#</CFOUTPUT></td>
> <cfloop Condition = "#TheDate# LESS THAN OR EQUAL TO
> #EndDate#"><!--- Create a loop to loop over the days from the
startdate
> to the enddate which should cover an entire month --->
>
> <CFQUERY name="GetHours"
> datasource="#DSN#">
>
> SELECT * FROM
> tblMaster,tblDetails
> WHERE tblMaster.ClientID =
> '#GetClients.ClientID#'
> AND tblDetails.RecordDate =
> #CreateODBCDate(TheDate)#
> AND tblMaster.empid =
> #client.empid#
> AND tblMaster.MasterID =
> tblDetails.MasterID
>
> </CFQUERY>
>
> <td class="SnowDataTD"><CFIF
> #GetHours.RecordHours# GT 0 
><cfoutput>#GETHOURS.RECORDHOURS#</cfoutput>
> <CFELSE> &nbsp </CFIF> </td>
> <CFSET TheDate =
> DateAdd("d",TheDate,1)><!--- Increment date value by one --->
>
>
> </CFLOOP><!--- Date Loop --->
> <td
>
class="SnowFieldCaptionTD"><CFOUTPUT>#GetClients.clientid#</CFOUT
PUT></t
> d>
>   <td
>
class="SnowFieldCaptionTD"><CFOUTPUT>#GetClients.hoursworked#</CF
OUTPUT>
> </td>
>       <td
>
class="SnowFieldCaptionTD"><CFOUTPUT>#GetClients.hoursbilled#</CF
OUTPUT>
> </td>
>       <td
>
class="SnowFieldCaptionTD"><CFOUTPUT>#GetClients.jobno#</CFOUTPUT
></td>
>   <!--- <td class="SnowFieldCaptionTD"><b>Acct Group</b></td>
> --->
>
>   </tr>
> <!---<CFSET TheDate = #CreateODBCDate('9/01/2002')#> Set variable to 
> the startdate --->
>
> <strong></strong>
> </CFLOOP><!--- Clients Query --->
>
>
>
> How the HELLS did it jump forward 7 days!!??
> I am not changing the date ANYWHERE...
>
> And I just don't understand what is happening...I'm tearing my
hair out
> and its already short and Im really starting to mess up my
scalp.
>
> Any ideas??
>
> Yes yes yes I know I can use an Index loop instead of the 
> conditional..I'll fix all those little things I suppose..but
before I do
> that I need to figure out why my dates are suddenly gaining
days!! :-\
>
> ARrrrrRRGGHH! What stupid thing am I doing now? :-(
>
> -Gel
>
>
>
>
>
>
>


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to