jmwhooper
Posts: 7
|
Posted: 04/01/2004, 8:13 AM |
|
Hi
I'm having trouble getting the date format set in my send mail.
I created a variable $eventDate and queried the MySQL DB and it pulls back a date 2004-08-01, good so far but I want to change the format.
When I use the CCFormatDate as ($eventdate is 2004-08-01):
$eventDate = CCFormatDate($eventDate,array("LongDate"));
the date always returns Thursday, January 1, 1970
It even gives the same result if I try and type the date to convert such as:
$eventDate = CCFormatDate("2004-08-01",array("LongDate"));
Any ideas?
|
|
|
sebastian
Posts: 15
|
Posted: 04/02/2004, 10:03 AM |
|
You either need to pass an array generated by CCParseDate() function as the first parameter of CCFormatDate () function, or pass a UNIX timestamp.
To retrieve a unix timestamp of a datetime database column, you need to select UNIX_TIMESTAMP(date_field)
Sebastian
|
|
|
|