CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 PHP and CCFormatDate

Print topic Send  topic

Author Message
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?
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.