i mean in setValue (year, month , date ) which format do i have to use On Sun, Apr 12, 2009 at 10:15 PM, sh al <[email protected]> wrote:
> 'HH:mm MMMM dd,yyyy'} > or i have to type hours : mins space April 15,2009 ??? > > > or ????? > > > > > On Sun, Apr 12, 2009 at 10:03 PM, sh al <[email protected]> wrote: > >> Thank you ,,,,,, but can u tel me how do i submit the date time >> data.setValue(0, 0, new Date(2009,2,31,15,23,0)); // Row 0, >> column 0, date >> >> year 2009, month 2 , date 31, hour 3 , mins 23, second 0 >> >> >> is that right or instead of , i type / ??? >> >> >> >> On Sun, Apr 12, 2009 at 9:40 PM, Rolan <[email protected]> wrote: >> >>> >>> On Apr 9, 4:46 pm, VizGuy <[email protected]> wrote: >>> > This is of course not an Annotated time line issue, but a general >>> problem of >>> > converting SQL dates into js dates.Once you succeed to create a data >>> table, >>> > with a valid date or datetime column, and a valid js Date object in the >>> > value, you should be good. >>> ... >>> >>> >>> To save some trouble, here's is a code snippet: >>> >>> /** >>> * converts "m/d/Y hh:mm" into a Date object >>> */ >>> function convertDate(datetime) { >>> var tmp=datetime.split(' '); >>> var dt=tmp[0].split('/'); >>> var t=tmp[1].split(':'); >>> var d = new Date; >>> d.setFullYear(dt[2],(dt[0]-1),dt[1]); >>> d.setHours(t[0],t[1],0,0); >>> return d; >>> } >>> >>> >>> Also, I think the API for the Annotated Time Line gadget changed >>> recently. The time display on top of the graph began to only show the >>> "Date" and not "Time+Date". Turns out, now you have to specify the >>> DateFormat as an option when calling the draw method. >>> >>> chart.draw(data, {displayAnnotations: true,dateFormat: 'HH:mm MMMM dd, >>> yyyy'}); >>> >>> ~Rolan >>> >>> >>> >>> >>> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en -~----------~----~----~----~------~----~------~--~---
