Everytime you loop through that query you're setting every
EpisodeStart field in the table to the same value.. you'll need a
Where clause in there.


On Thu, 16 Dec 2004 11:34:31 -0500, Judith Taylor <[EMAIL PROTECTED]> wrote:
> Greets,
> 
> Ok, so I have this generated report that has dates formatted as a number
> (yyyymmdd). Now, when I import this report (text file) into Access, it
> only sees it as a Number. Here's my problem. As you can imagine, this
> format is useless for doing date comparisons with other tables.
> 
> How do I convert this number into a useable date format?
> 
> I've tried various permutations of the following with little success:
> 
> <cfoutput query="GetDates">
> <cfset mo = Mid(FromCert, 5 ,2)>
> <cfset da = Right(FromCert, 2)>
> <cfset yr = Left(FromCert, 4)>
> <cfset startdate = DateFormat(CreateDate(yr,mo,da), "mm/dd/yyyy")>
>    <cfquery name="update" datasource="PPSData">
>       UPDATE tblPPSRetro
>       SET EpisodeStart = <cfqueryparam cfsqltype="cf_sql_date"
>             value="#startdate#">
>     </cfquery>
> </cfoutput>
> 
> If I do a straight cfoutput (without the update query) the results are
> as expected (results to the screen/web page) in that I get every date in
> the column. But as soon as I add the cfquery - it goes all wonky and
> repeats only one date all the way down (and not even the correct date).
> 
> Any and all help would be greatly appreciated.
> 
> Thanks,
> Judith
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:530
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to