Copy link to clipboard
Copied
Hi,
My code below worked file and save file into txt file. However, the date is the problem. I have to open excel file and manulay change the format of the date to make it shows the correct date, other way, it alutomatic shows 00:00:00 when i first open the file. How can i make the date automatic shows from the file i generated in excel?
<cfset tab = chr(9)>
<cfset Str = "">
<cfloop query="q_report">
<cfset Str = Str & q_report.purchasedNo & tab & q_report.desc & tab & q_report.Del_date & chr(13) & chr(10)>
</cfloop>
<cffile action="write" output="#Str#" file="#variables.file#">
thanks
Copy link to clipboard
Copied
Have you tried using DateFormat() on the date?
^_^