You often don't need to actually work with a date/time object in ColdFusion. If you want to extract the month/day/year/time parts, you can simply use the month()/day()/year() (and other) functions on a string which is formatted as a date. ColdFusion will figure it out (parsing the date/time behind the scenes).
However, it may be a bit more efficient for you to manually parse a date/time string first before calling the other functions on it (so that ColdFusion doesn't have to parse it each time). For that, you can use the
parseDateTime() function. Ex:
Code:
<cfset myDate = parseDateTime( myQuery.dateCol )>
<cfset theDay = day( myDate )>
<cfset theMonth = month( myDate )>
<cfset theYear = year( myDate )>
There are also functions for retrieving the time parts, and the
dateFormat() function which is very straightforward and useful for displaying formatted date/times (which also doesn't require a parseDateTime() call beforehand).
The list of date/time functions is here:
http://help.adobe.com/en_US/ColdFusi...cbec22c24-6986
---
Nothing comes to mind right off the bat for a tutorial on scheduled tasks, but if you have access to the ColdFusion administrator on your server, you can set them up right from there. Otherwise there's the <cfschedule> tag for setting one up.
Scheduled tasks are really just as simple as the server running a .cfm file at a given url, on a given time interval. The server will run the .cfm file just like it would any other .cfm file, so that's where you'd put your processing.
The generated output from the file (if any) won't be visible though (as you're not manually loading up the .cfm page in a web browser), but you can have it be sent to a log file for later inspection if needed.