View unanswered posts | View active topics It is currently Wed May 15, 2024 6:51 pm



Reply to topic  [ 2 posts ] 
Mysql date 
Author Message
pChart user
pChart user

Joined: Fri Nov 11, 2011 12:32 am
Posts: 4
Post Mysql date
Hello !

I want to user my Mysql dates in the x-Axis but always getting 01-01-1970???

Date raw data:

Quote:
2010-10-20 12:45:00


Code:
// X-Axis
      $MyData->addPoints($dataSetTimestamp,"Timestamp");
       $MyData->setAbscissa("Timestamp");
   
       /* Name this axis "Time" */
      $MyData->setXAxisName("Time");
      
      /* Specify that this axis will display time values */
      $MyData->setXAxisDisplay(AXIS_FORMAT_DATE,"Y-m-d");



what is wrong???


Fri Nov 11, 2011 12:35 am
Profile
pChart user
pChart user

Joined: Fri Nov 11, 2011 12:32 am
Posts: 4
Post Re: Mysql date
ok I solved it by using:

Code:
$dataSetTimestamp[] = strtotime($row->date_of_exam);


But is there a possibility to stretch the date axis to a "real" axis in terms of time?


Fri Nov 11, 2011 12:58 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: