app动效网站,如何来做网站,境外注册网站,重庆企业网站营销设计mysql语句中把string类型字段转datetime类型在mysql里面利用str_to_date#xff08;#xff09;把字符串转换为日期此处以表h_hotelcontext的Start_time和End_time字段为例#xff0c;查询当前时间在此范围之内的数据。 www.2cto.com select * from h_hotelcontext where …mysql语句中把string类型字段转datetime类型 在mysql里面利用str_to_date把字符串转换为日期 此处以表h_hotelcontext的Start_time和End_time字段为例查询当前 时间在此范围之内的数据。 www.2cto.com select * from h_hotelcontext where now() between STR_TO_DATE (Start_time,%Y-%m-%d %H:%i:%s) and STR_TO_DATE(End_time,%Y-%m-%d %H:%i:%s); 注%Y-%m-%d %H:%i:%s格式为2012-10-11 16:42:30转载于:https://www.cnblogs.com/reynold-lei/p/3149226.html