mmyyy date to matlab date
Ältere Kommentare anzeigen
Hi there.
I have a column vector with dates on the following format: yyyymm
E.g. [199001, 199002, 199003 ...]'
They are all the last trading day of the month.
How can I transform them into matlab serial date numbers?
Thanks
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 8 Aug. 2014
d=[199001, 199002, 199003 ]
a=arrayfun(@(x) datenum(num2str(x),'yyyymm'),d)
2 Kommentare
Azzi Abdelmalek
am 8 Aug. 2014
Bearbeitet: Azzi Abdelmalek
am 8 Aug. 2014
V commented
Dear Azzi, Thank you for your answer. However, the code you mentioned gives me the first day of month and not the last trading day. Thanks
Azzi Abdelmalek
am 8 Aug. 2014
There are no days in your data, look at your question, (yyyy/mm)
Kategorien
Mehr zu Financial Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!