datestr function Unrecognized month format error
3 ビュー (過去 30 日間)
古いコメントを表示
Yusuf Suer Erdem
2021 年 7 月 12 日
コメント済み: Yusuf Suer Erdem
2021 年 7 月 15 日
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 件のコメント
採用された回答
Walter Roberson
2021 年 7 月 12 日
you have 5 m for the month field but datestr only permits up to 4 m
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!