extract date from date time command in matlab

83 次查看(过去 30 天)
Hi
I am using date time command in MATLAB but want only date and not time. Is there any other command?

回答(1 个)

Stephen23
Stephen23 2021-2-20
编辑:Stephen23 2021-2-20
You don't need another command, you just need to change the format property:
For example:
Dt.Format = 'yyyy-MM-dd';
See also the examples:

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by