I am running ColdFusion 9 and Oracle database. I am trying to group all files from a directory by the dateLastModified
using:
<cfdirectory action="LIST"
directory="#path_to_files#"
name="res"
sort="datelastmodified desc,name ASC"
filter="#filters#">
For example:
- Date of File 1: 2016-10-03 11:49:00 am
- Date of File 2: 2016-10-03 07:49:00 am
- Date of File 3: 2016-08-03 07:49:00 am
File 1 & 2
should be group 1 and File 3
should be group 2
If I use a query of query, how can I compare the date based on days not time? This is what I have so far but it does not seem to work. I get no records.
<cfquery name="getfiles" dbtype="query">
SELECT name, datelastmodified
FROM res
WHERE CAST( [datelastmodified] as date) = CAST(<cfqueryparam cfsqltype="CF_SQL_DATE" value="#d#"/> as date)
</cfquery>
Does anyone know a different method to group files based on days not time?