Hi all - sitting here learning CF on a rogue server out of my apartment. I have an issue where a certain query is returning no data, but should be.
I'm creating a "schedule." The times in the database are currently a bit wrong, so to speak, in that they are returned to CF for example as "1899-12-30 18:30:22." i.e. that would be 6:30 pm and 22 seconds.
When the numbers get to midnight, its not 24:00:00, but 00:00:00.
My query is currently an if, then statement looking for ranges like 01:55:00 - 02:05:00 to grab a certain entry. But when it gets to midnight (i.e. 23:55:00 - 00:05:00) it returns nothing.
See example code below. Here I'm trying to snag an approximately 30 minute entry in duration (between 24 minutes and 40 minutes) and the Start Time is between 11:55 pm and 12:18 am. Day of the week is not an issue, as I'm displaying this as a row across rather than down a column.
I'm creating a "schedule." The times in the database are currently a bit wrong, so to speak, in that they are returned to CF for example as "1899-12-30 18:30:22." i.e. that would be 6:30 pm and 22 seconds.
When the numbers get to midnight, its not 24:00:00, but 00:00:00.
My query is currently an if, then statement looking for ranges like 01:55:00 - 02:05:00 to grab a certain entry. But when it gets to midnight (i.e. 23:55:00 - 00:05:00) it returns nothing.
See example code below. Here I'm trying to snag an approximately 30 minute entry in duration (between 24 minutes and 40 minutes) and the Start Time is between 11:55 pm and 12:18 am. Day of the week is not an issue, as I'm displaying this as a row across rather than down a column.
<CFOUTPUT query="schedule">
<cfif (Duration gt "0:24:00") and (Duration lt "0:40:00") and (Time gt "1899-12-30 23:55:00") and (Time lt "1899-12-30 00:18:00")>
<td width="12%" rowspan="1">
#EpisodeName#
</td>
</cfif>
</CFOUTPUT>