We use <cfspreadsheet > to upload Excel spreadsheet into database, but having 
an issue with reading dates. <cfspreadsheet> only reads last 2 digits of the 
year, e.g. the date in the Excel file is 2/2/1999, the <cfspreadsheet> reads it 
as 2/2/99. Below is my code:
<cfset strDir=GetDirectoryFromPath(ExpandPath("*.*")) & "/uploadFile">
        <cffile action="Upload"
                        filefield="InputFile"
                        destination="#strDir#"
                        nameconflict="Overwrite" 
                        mode="757">                     
        <cfset destFileName = file.ServerDirectory & "\Book1.xls">
        <cfspreadsheet action="read" 
                        src ="#destFileName#"           
                        columnnames = "name,dob" 
                        query="qryResult">
        <cfdump var="#qryResult#">
The query dumped out like this:
query

        DOB     NAME
1       2/2/99  John 

Anyone can help?
Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349804
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to