Solved

is this funky cfoutput query trick possible?

Posted on 2003-12-03
3
226 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
Comment Utility
<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
Comment Utility
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
Comment Utility
awesome - works perfectly
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

12 Experts available now in Live!

Get 1:1 Help Now