--=====================_297852799==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

For the cute off time, type typing:


Where posting_time> ###cut_off_time###

The reason is because Dates in SQL need to be entered like: #10/10/2000#, 
however with coldfusion, variables are surrounded by #, so you need to add 
the ## to append the single pound sign infront and after the date.


At 08:19 PM 11/28/00 -0500, Jordie you wrote:

>This is what happens when non programmers pick up programming .. we miss 
>some of the basics along the way. I'm try to run a conditional select 
>based on the age of the time the entry was made into the dB (posting_time) 
>.. specifically I plan to offer the user a form to select all entries made 
>after a chosen date (cut_off_time)
>
>something to the affect of
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>         <cfset cut_of_time = #DateFormat(Form.date_entered)#>
>
>         <cfquery name="acme" datasource="main">
>                 SELECT *
>                 FROM table
>                 WHERE posting_time > #cut_off_time#
>         </cfquery>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>I can get it to work if I bring them all back and then only present the 
>entries that clear the condition .. but it seems like a lot more work on 
>the server that way.
>TIA,
>
>Jordie Fike
>Tech Admin
>Outer Banks Internet
>[EMAIL PROTECTED]
>www.outer-banks.nc.us
>phone - 1.252.441.6698
>fax - 1.252.480.2259
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Structure your ColdFusion code with Fusebox. Get the official book at 
>http://www.fusionauthority.com/bkinfo.cfm
>
>Archives: http://www.mail-archive.com/[email protected]/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
>-=-=-
>SBG-Priority: 4 (Low) http://www.internz.com/SpamBeGone/

-- 
Michael She
I m a g i n e   C o m m u n i c a t i o n s
Company E-mail: [EMAIL PROTECTED]
Personal E-mail: [EMAIL PROTECTED]
ICQ UIN: #243466
Personal Homepage: http://www.michaelshe.com (Under Construction)
Imagine Communications: http://www.imagineer.net
PGP Fingerprint: 9A24 1DA9 39B8 0A0C C5ED 6E5D 45E9 075A 51CD 66A1 
--=====================_297852799==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
For the cute off time, type typing:<br>
<br>
<br>
Where posting_time&gt; ###cut_off_time###<br>
<br>
The reason is because Dates in SQL need to be entered like: #10/10/2000#,
however with coldfusion, variables are surrounded by #, so you need to
add the ## to append the single pound sign infront and after the
date.<br>
<br>
<br>
At 08:19 PM 11/28/00 -0500, Jordie you wrote:<br>
<br>
<blockquote type=cite class=cite cite><font face="MS Sans Serif, Geneva">This
is what happens when non programmers pick up programming .. we miss some
of the basics along the way. I'm try to run a conditional select based on
the age of the time the entry was made into the dB (posting_time) ..
specifically I plan to offer the user a form to select all entries made
after a chosen date (cut_off_time)<br>
<br>
something to the affect of<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;cfset
cut_of_time = #DateFormat(Form.date_entered)#&gt;<br>
<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;cfquery
name=&quot;acme&quot; datasource=&quot;main&quot;&gt;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>SELECT
*<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>FROM
table<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>WHERE
posting_time &gt; #cut_off_time#<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;/cfquery&gt;<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
I can get it to work if I bring them all back and then only present the
entries that clear the condition .. but it seems like a lot more work on
the server that way.<br>
TIA,<br>
<br>
Jordie Fike <br>
Tech Admin<br>
Outer Banks Internet<br>
[EMAIL PROTECTED]<br>
<a href="http://www.outer-banks.nc.us/" eudora="autourl">www.outer-banks.nc.us</a><br>
phone - 1.252.441.6698<br>
fax - 1.252.480.2259<br>
</font><br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
Structure your ColdFusion code with Fusebox. Get the official book at
<a href="http://www.fusionauthority.com/bkinfo.cfm" 
eudora="autourl">http://www.fusionauthority.com/bkinfo.cfm</a><br>
<br>
Archives:
<a href="http://www.mail-archive.com/[email protected]/" 
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
Unsubscribe:
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists</a><br>
<br>
-=-=-<br>
SBG-Priority: 4 (Low)
<a href="http://www.internz.com/SpamBeGone/" 
eudora="autourl">http://www.internz.com/SpamBeGone/</a>
</blockquote><br>
<div>-- </div>
<div>Michael She</div>
<div>I m a g i n e&nbsp;&nbsp; C o m m u n i c a t i o n s</div>
<div>Company E-mail: [EMAIL PROTECTED] </div>
<div>Personal E-mail: [EMAIL PROTECTED]</div>
<div>ICQ UIN: #243466 </div>
<div>Personal Homepage: <a href="http://www.michaelshe.com/" 
EUDORA=AUTOURL>http://www.michaelshe.com</a> (Under Construction) </div>
<div>Imagine Communications: <a href="http://www.imagineer.net/" 
EUDORA=AUTOURL>http://www.imagineer.net</a> </div>
PGP Fingerprint: 9A24 1DA9 39B8 0A0C C5ED 6E5D 45E9 075A 51CD 66A1
</html>

--=====================_297852799==_.ALT--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to