I would like to convert a date in the format of, for e.g., 02 September 2004, to a datenumber. But this format is not a standard Matlab format. Does anyone know how I could do this please?
1 次查看(过去 30 天)
显示 更早的评论
I would like to convert a date in the format of, for e.g., 02 September 2004, to a datenumber. But this format is not a standard Matlab format. Does anyone know how I could do this please?
0 个评论
采纳的回答
dpb
2016-6-20
Read the doc and use the named parameter 'InputFormat'
t=datetime(DateStrings,'InputFormat',infmt); % interpret DateStrings using the format specified by infmt.
更多回答(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!