朱杰兵blog

jonhney'blog
posts - 140, comments - 1, trackbacks - 0, articles - 0

mysql数值型转dateTime

Posted on 2015-01-16 10:23 朱杰兵 阅读(130) 评论(0)  编辑  收藏
int型转dateTime              select from_unixtime(1210003200) datetime, unix_timestamp(from_unixtime(1210003200)) timestamp;
bigint型转dateTime          select from_unixtime(createTime/1000),from_unixtime(waitLoadTime/1000) from ORDER_CAR where orderId=1407


--入库工单 SELECT '入库码单' TYPE, COUNT(1) sumNum, SUM(a.weight) sumWeight,from_unixtime(b.lastOperateTime/1000,'%Y-%m-%d') lastOperateTime, b.lastOperator,b.warehouseName, a.breedName FROM WAREHOUSE_IN_GOODS_LIST a LEFT JOIN WAREHOUSE_IN_INFO b ON a.inId=b.id --WHERE b.isCancel = ? AND b.lastOperateTime >= ? AND b.lastOperateTime <= ? AND b.lastOperator IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) GROUP BY b.warehouseName,b.lastOperateTime,b.lastOperatorId,a.breedId ORDER BY b.lastOperateTime DESC  

只有注册用户登录后才能发表评论。


网站导航: