Info
此问题已关闭。 请重新打开它进行编辑或回答。
date to number
1 次查看(过去 30 天)
显示 更早的评论
Hi How to change the date with this format to number: 09-08-01 00:56:33
Thanks
3 个评论
回答(1 个)
sunil anandatheertha
2012-1-19
Try using this for general purposes: a=clock;a(1),a(2),a(3),a(4),a(5),a(6)
Assuming the 09-08-01 00:56:33 to be,
day-month-year hrs:mins:secs, you can try using the following
a = '09-08-01 00:56:33'
day = str2num(a(1:2))
month = str2num(a(4:5))
year = ...
and so on. Hope this helped..
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!