This is a multi-part message in MIME format.

------=_NextPart_000_003D_01BFAF91.1A170C20
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Ok, the first time I posted this, I didn't get any responces, so I'm =
going to try to better explain the problem.  Here goes:

Here's what I want to do:  When the URL is entered as:=20
http://www.mydomain.com/news-date.cfm?NewsDate=3D04/25/00

I want the news with the dated on April 25th to show up.  Seems pretty =
simple right?  Well, the date in the database is stored in Date + Time =
(MS SQL 7), so all the times are different for each day, depending on =
when it was posted.  What I have been trying to do is use the =
#CreateODBCDate(NewsDate)# to match the database.  Here's what I tried:

<CFOUTPUT>
<CFQUERY Datasource=3D"Athlonmb" Name=3D"WebNewsData" MaxRows=3D30>
 SELECT dbo.News.NewsID, dbo.News.Title, dbo.News.Date, dbo.News.Author, =
dbo.News.Source,
  dbo.News.Link, dbo.News.Information, dbo.News.Status, =
dbo.Authors.AuthorID, dbo.Authors.AuthorName,
 dbo.Authors.AuthorEmail
 FROM News, Authors
 WHERE (dbo.News.Author =3D dbo.Authors.AuthorID) AND (dbo.News.Status =
=3D 2)
  AND (dbo.News.Date =3D #CreateODBCDate(NewsDate)#)
 ORDER BY dbo.News.Date DESC
</cfquery>
</cfoutput>

But it always returns NO results.  So I assume that becuase the time on =
the CreateODBCDate is blank, the CF sees it as not an exact match, and =
skips over it.  Using the #CreateODBCDateTime(NewsDate)# doesn't work =
either, since the time it uses 00:00:00, which has no matches for the =
search, either.

I then thought about using the #CreateODBCDate# function on the =
dbo.News.Date part of the equation, but the server rejects it.  So, =
(#CreateODBCDate(dbo.News.Date)# =3D #CreateODBCDate(NewsDate)#) doesn't =
work either.=20

This is a real thorn in me right now, and I have a tight time-frame with =
which to figure it out.  Please, you have any help, reply to this forum =
AND to [EMAIL PROTECTED] so I can get the information faster.

Thanks in advance!

Ryan Shrout
Production Manager
AthlonMB.com
http://www.athlonmb.com/
[EMAIL PROTECTED]

------=_NextPart_000_003D_01BFAF91.1A170C20
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3013.2600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Ok, the first time I posted this, I =
didn't get any=20
responces, so I'm going to try to better explain the problem.&nbsp; Here =

goes:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Here's what I want to do:&nbsp; When =
the URL is=20
entered as:&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.mydomain.com/news-date.cfm?NewsDate=3D04/25/00">http:/=
/www.mydomain.com/news-date.cfm?NewsDate=3D04/25/00</A></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I want the news with the dated on April =
25th to=20
show up.&nbsp; Seems pretty simple right?&nbsp; Well, the date in the =
database=20
is stored in Date + Time (MS SQL 7), so all the times are different for =
each=20
day, depending on when it was posted.&nbsp; What I have been trying to =
do is use=20
the #CreateODBCDate(NewsDate)# to match the database.&nbsp; Here's what =
I=20
tried:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;CFOUTPUT&gt;<BR>&lt;CFQUERY=20
Datasource=3D"Athlonmb" Name=3D"WebNewsData" =
MaxRows=3D30&gt;<BR>&nbsp;SELECT=20
dbo.News.NewsID, dbo.News.Title, dbo.News.Date, dbo.News.Author,=20
dbo.News.Source,<BR>&nbsp;&nbsp;dbo.News.Link, dbo.News.Information,=20
dbo.News.Status, dbo.Authors.AuthorID,=20
dbo.Authors.AuthorName,<BR>&nbsp;dbo.Authors.AuthorEmail<BR>&nbsp;FROM =
News,=20
Authors<BR>&nbsp;WHERE (dbo.News.Author =3D dbo.Authors.AuthorID) AND=20
(dbo.News.Status =3D 2)<BR>&nbsp;&nbsp;AND (dbo.News.Date =3D=20
#CreateODBCDate(NewsDate)#)<BR>&nbsp;ORDER BY dbo.News.Date=20
DESC<BR>&lt;/cfquery&gt;<BR>&lt;/cfoutput&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But it always returns NO results.&nbsp; =
So I assume=20
that becuase the time on the CreateODBCDate is blank, the CF sees it as =
not an=20
exact match, and skips over it.&nbsp; Using the =
#CreateODBCDateTime(NewsDate)#=20
doesn't work either, since the time it uses 00:00:00, which has no =
matches for=20
the search, either.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I then thought about using the =
#CreateODBCDate#=20
function on the dbo.News.Date part of the equation, but the server =
rejects=20
it.&nbsp; So, (#CreateODBCDate(dbo.News.Date)# =3D =
#CreateODBCDate(NewsDate)#)=20
doesn't work either. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This is a real thorn in me right now, =
and I have a=20
tight time-frame with which to figure it out.&nbsp; Please, you have any =
help,=20
reply to this forum AND&nbsp;to <A=20
href=3D"mailto:to [EMAIL PROTECTED]">[EMAIL PROTECTED]</A> so I can get the=20
information faster.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ryan Shrout<BR>Production=20
Manager<BR>AthlonMB.com<BR><A=20
href=3D"http://www.athlonmb.com/">http://www.athlonmb.com/</A><BR><A=20
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A></FONT></DIV=
></BODY></HTML>

------=_NextPart_000_003D_01BFAF91.1A170C20--

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to