It's been one of those days already - can anyone tell me why the time gets
stripped out? I'm aware that I'm using 'date' as an argument type, but
datetime throws an error and there's nothing in CF8 docs on it... How do I
preserve the time data?
<cffunction name="dateFormatter2" returntype="string">
<cfargument name="startDate" type="date">
<cfargument name="endDate" type="date">
<cfscript>
var result ="";
startDate=dateFormat(arguments.startdate, 'dd mmmm yyyy');
startTime=timeFormat(arguments.startdate, "HH:MM");
endDate=dateFormat(arguments.enddate, 'dd mmmm yyyy');
endTime=timeFormat(arguments.enddate, "HH:MM");
</cfscript>
<cfsavecontent variable="result">
<cfoutput>Start: #startDate#, #startTime# <br />End: #endDate#,
#endTime#</cfoutput>
</cfsavecontent>
<cfreturn result>
</cffunction>
<cfoutput>
#dateFormatter2(now(),now())#
</cfoutput>
Cheers!
T
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336349
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm