Page 1 of 1

Comma in MySQL date output

Posted: September 19th, 2009, 4:15 am
by sohel2009
I am using a cold fusion cfquery to get data from my vB database.
One of the fields I am trying to get is a date field, and as you know they're unix datetimes.

I am using this and it works great:
<cfquery name="emaillist" datasource="#DSNMySQL#">
SELECT
stuff,
date_format(from_unixtime(vB36_user.joindate),'%M %d %Y') as joindate
FROM
vB36_user
</cfquery>

The output looks like this: January 1 2003.
What I want is January 1, 2003.

How can I get the comma? If I use '%M %d, %Y', it puts the year into a new column.
I could format it the cold fusion page, but that's not how I'm using it, I build a script to download a csv of the data.