get month of date from string
Show older comments
I used this code, for exporting the month of years, but it doesn't work for all of my dates, and return NAN for some dates... what is the problem?
if true
mnth= month(datetime(date,'InputFormat','yyyy/MM/dd')) end
2 Comments
KSSV
on 25 Oct 2018
YOur date variable at the end is 0..so it is NaN.
Nooshin Mahmoodi
on 25 Oct 2018
Accepted Answer
More Answers (0)
Categories
Find more on Calendar in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!