Hi all,
I could use a little help with this one as I can't seem to find a solution for
this anywhere, and I have definitely been wasting too much of my time on
something so small! Anyways, I am wondering if there are any known issues with
the SpreadsheetFormatColumns function in regards to formatting datetime fields
from sql? I have searched and searched, and tried every variation I could think
of with the following code, but cannot get it to format the dates. I would
definitely appreciate any feedback on this one, or if anyone knows of any
issues with this.
Here is one of my code versions:
<cfset sObj=SpreadsheetNew()>
<cfset SpreadsheetAddRow(sObj, "Client,Leave Owner,Leave Number,Request
Date,Leave Reason,Elig Confirmed Date,Packet Mailed Date")>
<cfset SpreadsheetAddRows(sObj, drilldowns)><cfset
SpreadsheetFormatColumns(sObj, {dataformat="mm/dd/yyyy"}, "4,6-7")><cfset
SpreadsheetFormatRow(sObj, {bold=TRUE, alignment="center"}, 1)>
<cfspreadsheet action="write" name="sObj"
filename="filename#dateformat(now(), 'mmddyyyy')#.xls" overwrite="true">
I could very easily write this differently, or convert the fields in sql, but
since I started this to try out some of the CFSpreadsheet stuff, I wanted to
see if there was a solution while still using it this way.
Th
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:334724
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm