问一个时间转换的问题。
$row["Newstime"]是在mssql里读出来的datetime类型数据表,格式为:2002-9-4 11:10:40
我要把它转为int类型格式插入到mysql数据表中,格式为:1135098000。
这该怎样做呢?
$arr_tmp = explode("-",date('Y-m-d', $row["Newstime"]));
mktime(1,0,0,$arr_tmp[1],$arr_tmp[2],$arr_tmp[0]);
上面这样做法为什么不对呢?
Windows does not support negative values for this function in E:\wwwphp\lishe\_data_import\_data_importMgr.php on line 39
出现以上的错误信息