Hi,
First I would like to thank everybody for all there help on my project:)

I am trying to figure out how I can be sure that the daily tip is the current 
date here in Hawaii. The server is located in New Jersey, which is 6 hours 
ahead of Hawaii. Eventhough it is a daily tip, everyday at 6:00pm in Hawaii the 
day changes on the server, but not here in Hawaii.

What I have is below, and I am wondering if this will work, or if I should 
change the "time" setting, as I think I have create it, but am not calling it 
in the cfquery? Am I wrong about this, or does this just get included in the 
cfquery? In the first <cfset, I tried to add the dataadd, but got an error.

thanks so much,
John
<!--- Code--->
<cfset tipdate = #CreateODBCDate(now())#>
<cfset time = Now()>
<cfset time = dateadd("h",-6,time) />


<cfquery name="rs_dailytip" datasource="#REQUEST.dataSource#">
SELECT record_id, tipdate, dailytip, consumer_link, research_link
FROM daily_tip_new 
WHERE tipdate = #tipdate#
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>

<body>
 <cfif rs_dailytip.recordcount>
        <cfoutput>#DateFormat(tipdate, "mmmm d, yyyy")#</cfoutput><br />
    <cfoutput>#rs_dailytip.dailytip#</cfoutput>
        <cfelse>No Daily tip today!
            </cfif>
                  <br /> 
                  Consumer Related Article:<br />
                  <cfoutput>#rs_dailytip.consumer_link#</cfoutput>
                  <br /> 
                  Research Related Article:<br />
            <cfoutput>#rs_dailytip.research_link#</cfoutput>
                <p>
                <cfoutput>The time= #TimeFormat(time,'h:mm tt')#</cfoutput>

</body>
</html>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3907
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to