Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

is this funky cfoutput query trick possible?

Posted on 2003-12-03
3
Medium Priority
?
240 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

688 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