Solved

is this funky cfoutput query trick possible?

Posted on 2003-12-03
3
236 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…

856 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