How can i generate array with dates like this:
Timestamps in javascript miliseconds format from 2010.12.01 00:00:00 to 2010.12.12.30 23.59.59 with step 5 minutes.
['2010.12.01 00:00:00', '2010.12.01 00:05:00','2010.12.01 00:10:00','2010.12.01 00:15:00', ...]
I just felt that it might be worthwhile to note that
pandas
also has this functionality. Depending on what case you are dealing with exactly, pandas might be a worthy tool to invest time in.This returns a pandas timeseries-index. Which can be converted to numpy arrays.
Well, obviously you start at the start time, loop until you reach the end time and increment inbetween.
Fairly trivial.
this is my variant for python3, but it's easy could be converted into python2.6 code: