Answered
cfscript and mysql date
I have page on my family's web site that has an option for
downloading a .csv file that's a list of all the family members and
is created using the cfscript I found at:
http://cflib.org/udf/QueryToCSV2
This is done so other family members can import the data into Outlook, Thunderbird, etc.
I'm using MySQL 5.0 as my database and when members register for the site, I have their birth date stored in the "BirthDate" column using the DATE format. When the fore mentioned UDF creates the .csv file, the BirthDate column of that is presented similar to {ts '2008-06-18}. I searched the forums and found, what I believe is a similar problem, at this forum post
I realize that mysql has date functions, but to me, that seems more on the insert query side than on the select query side.
So my problem is, how would I properly format the date in that <cfscript> (UDF) tag for the query so it appears as 2007-06-18 in the .csv file?
This is done so other family members can import the data into Outlook, Thunderbird, etc.
I'm using MySQL 5.0 as my database and when members register for the site, I have their birth date stored in the "BirthDate" column using the DATE format. When the fore mentioned UDF creates the .csv file, the BirthDate column of that is presented similar to {ts '2008-06-18}. I searched the forums and found, what I believe is a similar problem, at this forum post
I realize that mysql has date functions, but to me, that seems more on the insert query side than on the select query side.
So my problem is, how would I properly format the date in that <cfscript> (UDF) tag for the query so it appears as 2007-06-18 in the .csv file?
