||
1. 案例数据
date_mid2023(1:2)
ans =
2×1 cell 数组
{''2023-04-14 00:00:00''}
{''2023-04-14 01:00:00''}
将cell格式转为char
date_m=cell2mat(date_mid2023(1:2))
date_m =
2×21 char 数组
''2023-04-14 00:00:00''
''2023-04-14 01:00:00''
2. date_1=datevec(date_mid2023(1:2))
date_1 =
2023 4 14 0 0 0
2023 4 14 1 0 0
3. date_2=datetime(date_1(:,1),date_1(:,2),date_1(:,3),date_1(:,4),date_1(:,5),date_1(:,6))
date_2 =
2×1 datetime 数组
2023-04-14 00:00:00
2023-04-14 01:00:00
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-21 22:28
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社