I just spotted it myself, but I cheated on the Milliseconds cause I didn't
know the code
Its now working and thanks for your help, certainly been a learning curve!
var d=new Date();
> d.setDate(d.getDate() - 1);
>
> var year = d.getFullYear();
> var month = d.getMonth() + 1;
> var day = d.getDate();
> var hour = d.getHours();
> var minute = d.getMinutes();
> var second = d.getSeconds();
> var microsecond = d.getDate();
>
> if (month.toString().length == 1) {
> month = '0' + month;
> }
>
> if (day.toString().length == 1) {
> day = '0' + day;
> }
>
> if (hour.toString().length == 1) {
> hour = '0' + hour;
> }
>
> if (minute.toString().length == 1) {
> minute = '0' + minute;
> }
>
> if (second.toString().length == 1) {
> second = '0' + second;
> }
>
> //while(microsecond.toString().length < 3) {
> // microsecond = '0' + microsecond;
> //}
>
> var dateString = year + '-' + month + '-' + day + ' ' + hour + ':' +
> minute + ':' + minute+ '.' + '000';
>
--
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.
For more options, visit https://groups.google.com/groups/opt_out.