[英]Bad Dates in iReport corrupting jasper server report
I am getting null dates in iReport and some dates with 0000-00-00 and some with invalid dates. 我在iReport中得到的日期为空,而某些日期为0000-00-00和某些日期为无效。 Aside from changing the database itself I need to be able to clear them or something.
除了更改数据库本身之外,我还需要能够清除它们或其他内容。 I was thinking of handling this on the SQL side of things, opinions or solutions welcome.
我当时正在考虑在SQL方面解决此问题,欢迎提出意见或解决方案。
Here is one way of accomplishing this on the SQL side: 这是在SQL端完成此操作的一种方法:
IF(yourtable.yourdatefield < '1970-01-01',
CAST(yourtable.yourdatefield AS CHAR(10)),yourtable.yourdatefield) AS yourdatefield
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.