1、sscanf函数
功能:将日期按照指定格式截取日期中的各个部分保存为整型变量
样例:
int year,month,day,hour,minute,second;
sscanf("2020-8-18 10:30:00","%d-%d-%d %d:%d:%d",&year,&month,&day,&hour,&minute,&second);
lr_output_message("year=%d",year);
2024-03-07 23:02:39
1、sscanf函数
功能:将日期按照指定格式截取日期中的各个部分保存为整型变量
样例:
int year,month,day,hour,minute,second;
sscanf("2020-8-18 10:30:00","%d-%d-%d %d:%d:%d",&year,&month,&day,&hour,&minute,&second);
lr_output_message("year=%d",year);