Reputation: 73
I need to create a list of datetime as presented in the attached Figure in Matlab, but I am not getting it.. so far I have done:
t1 = datetime(2016, 4, 1, 0, 0, 0);
t2 = datetime(2018, 12, 31, 23, 45, 0);
tinc = 15;
t = t1:minutes(tinc):t2;
But it gives me "01-Apr-2016 00:00:00"
Instead, I need:
2016-04-01 00:00:00 2016-04-01 00:15:00 ... 2018-12-31 23:45:00
Can someone explain to me how can I do it?
(The +01:00 is for daytime savings days that I can append later I guess).
Upvotes: 1
Views: 45