Solved

is this funky cfoutput query trick possible?

Posted on 2003-12-03
3
232 Views
Last Modified: 2013-12-24
this query is generating dates:

January 15 8:30AM
January 15 12:30PM
January 17 8:30AM
January 17 1:30PM
January 20 8:30AM
January 20 11:30AM
January 20 1:30PM

any way to put a space between the dates w/o reworking the entire thing too drastically:

January 15 8:30AM
January 15 12:30PM

January 17 8:30AM
January 17 1:30PM

January 20 8:30AM
January 20 11:30AM
January 20 1:30PM


<cfquery name="rsTimes" datasource=#MM_connCalArts_DSN# username=#MM_connCalArts_USERNAME# password=#MM_connCalArts_PASSWORD#>
SELECT count(*) as slotsremain,  timeslots_theater.timeslots, mix_theater.cities_id, cities_theater.cities,
mix_theater.timeslots_id, mix_theater.mix_id, timeslots_theater.id, exact_location FROM timeslots_theater,
mix_theater, cities_theater WHERE timeslots_theater.id = mix_theater.timeslots_id
AND cities_theater.id = mix_theater.cities_id AND cities_id = '#rsTimes__MMColParam#'
group by timeslots
order by timeslots asc
</cfquery>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<cfoutput query="rsTimes" group="timeslots">
    <li><A HREF="application.cfm?#Trim(MM_keepURL & Iif(MM_keepURL NEQ '',DE('&'),DE('')) & 'mix_id=' & rsTimes.mix_id)#" class="craig">#dateformat(rsTimes.timeslots, 'mmmm d, yyyy')#&nbsp; #timeformat(rsTimes.timeslots, 'h:MM tt')#</A> <br>
  </cfoutput>
0
Comment
Question by:phillystyle123
  • 2
3 Comments
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 9869768
<cfoutput query="rsTimes" group="timeslots">
    <li><A HREF="application.cfm?#Trim(MM_keepURL & Iif(MM_keepURL NEQ '',DE('&'),DE('')) & 'mix_id=' & rsTimes.mix_id)#" class="craig">#dateformat(rsTimes.timeslots, 'mmmm d, yyyy')#&nbsp;
        <cfoutput>
              #timeformat(rsTimes.timeslots, 'h:MM tt')#</A> <br>
         </cfoutput>
<br>
  </cfoutput>

just asking but why would you have a link to application.cfm? Seems sort of useless since application.cfm gets called on each request anyway....
0
 
LVL 6

Accepted Solution

by:
PE_CF_DEV earned 100 total points
ID: 9869841
wait I messed up I read the output wrong....
<cfset pastdate=dayofyear(rsTimes.timeslots[1])>
<cfoutput query="rsTimes">
<cfif pastdate NEQ dayofyear(rsTimes.timeslots)>
   <br>
</cfif>
<cfset pastdate=dayofyear(rsTimes.timeslots)>
    <li><A HREF="##">#dateformat(rsTimes.timeslots, 'mmmm d, yyyy')#&nbsp; #timeformat(rsTimes.timeslots, 'h:MM tt')#</A> <br>
  </cfoutput>

It also helps If I get the function right....dayofyear()
0
 

Author Comment

by:phillystyle123
ID: 9869994
awesome - works perfectly
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now