write data in dygraphs timestring format.