What should I do to display midnight in datetime?
12 次查看(过去 30 天)
显示 更早的评论
I use a Matlab in the window.
If I enter the datetime like below,
The result does not show time. I want the result like (2019-09-08 00:00:00)
What should I do? :(
>> datetime(2019,9,8,0,0,0)
ans =
datetime
2019-09-08
回答(1 个)
Stephen23
2020-8-3
>> dt = datetime(2019,9,8,0,0,0,'Format','yyyy-MM-dd HH:mm:ss')
dt =
2019-09-08 00:00:00
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!