when i put in browser 
*http://localhost/chart/chart1.php*
*
*
This is output:

{"cols":[{"label":"Date_of_Measure","type":"date"},{"label":"BloodGlucose","type":"number"}],"rows":[{"c":[{"v":"2013-03-07"},{"v":25}]},{"c":[{"v":"2013-03-07"},{"v":5}]},{"c":[{"v":"2013-03-07"},{"v":15}]},{"c":[{"v":"2013-03-07"},{"v":85}]}]}

*Is this OK?*

On Saturday, March 16, 2013 8:47:45 PM UTC+3, asgallant wrote:
>
> The first way will get you started with the Dates, as they have to be 
> input in the format "Date(year, month, day)".  How you turn your date 
> string into a Date object depends on how your date string is formatted. 
>  That code transforms a string of the format "year-month-day 
> hour:minute:second" into "Date(year, month, day)".
>
> On Saturday, March 16, 2013 10:25:31 AM UTC-4, [email protected] wrote:
>>
>> There is problem with PHP:(
>>>
>>> I will try to solve it
>> but I want to ask about type (Date)
>>
>>  array('label' => 'Date_of_Measure', 'type' => 'date'),
>> $rows = array();
>> while($r = mysql_fetch_assoc($sth)) {
>>     $temp = array();
>>
>> *I have two ways,but i do not know what is correct? *
>>
>> 1-
>>     $dateTimeArr = explode(' ', $r['Date_of_Measure']);
>>     $dateArr = explode('-', $dateTimeArr[0]);
>>     $year = $dateArr[0];
>>     $month = $dateArr[1] - 1;  // months are zero-indexed
>>     $day = $dateArr[2];   
>>     $temp[] = array('v' => "Date($year, $month, $day)";
>>
>> OR
>>
>> 2-
>> $temp[] = array('v' => (string) $r['Date_of_Measure']);
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to