datestr function Unrecognized month format error
2 次查看(过去 30 天)
显示 更早的评论
Hello :) could you help me with that error below?
"Error using matlab.internal.datetime.cnv2icudf (line 99) Unrecognized month format. Format: mmmmm dd, yyyy HH:MM:SS.FFF AM."
Those are my codes;
clc; clear; close all;
monday=datestr(now,'mmmmm dd, yyyy HH:MM:SS.FFF AM')
0 个评论
采纳的回答
更多回答(1 个)
Seth Furman
2021-7-14
We highly recommend using datetime in place of datestr, now, datenum, etc.
You can get a datetime version of the same value using datetime('now') and convert it to a text representation using the string function.
e.g.
dt = datetime('now','Format','MMMM dd, yyyy hh:mm:ss.SSS a')
txt = string(dt)
另请参阅
类别
在 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!