How to extract Month string from day_Month_Year time variable and create a new quarterly time index?
1 次查看(过去 30 天)
显示 更早的评论
Hi, i have a time index in this following format: day_month_year, for example, Oct_01_2019, how will i extract the months and create a new variable of months or quarter?.
Thanks. .
0 个评论
采纳的回答
Shubham Gupta
2019-11-7
If I understand the question correctly, this should work :
Month_variable = datestr(datenum('Oct_01_2019'),'mm');
I hope it helps !
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!