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#</CFOUTPUT></t
d>
                  <td
class="SnowFieldCaptionTD"><CFOUTPUT>#GetClients.hoursworked#</CFOUTPUT>
</td>     
          <td
class="SnowFieldCaptionTD"><CFOUTPUT>#GetClients.hoursbilled#</CFOUTPUT>
</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






______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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