mysql-时间查询

字符串格式

SELECT xx,xx FROM t_xx WHERE f_devId = 10 and f_datetime >= '180211201449' and f_datetime <= '180211221449' ;

处理时间

TIMESTAMP_STRUCT * timeStruct = varValue.m_pdate;

equipInfo.dateTime = str::cstr::format("%04d-%02d-%02d %02d:%02d:%02d", timeStruct->year, timeStruct->month, timeStruct->day,
timeStruct->hour, timeStruct->minute, timeStruct->second);