I am using Mirth v 2.2.3.6825.
I am aware that converting a date to UTC and back can mess with the timezone offset and if you are in the west the timestamp could be off by 24 hours. I have also performed several searches but I keep finding that the solution for most users is to use DateUtil.convertDate which in my case appears to be the problem.
I have a simple Mapper transformer that takes the date from OBR7.1 which is the actual datetime of the exam
DateUtil.convertDate("yyyyMMddhhmm","yyyy-MM-dd HH:mm", msg['OBR']['OBR.7']['OBR.7.1'].toString())
Example
the value in OBR7.1 is 20150313202208. it is being mapped as 2015-03-15 08:48. But the value should have been 2015-03-13 8:22. I have a few dozen examples of this across several channels.
Why is it off in both days and minutes?
I am aware that converting a date to UTC and back can mess with the timezone offset and if you are in the west the timestamp could be off by 24 hours. I have also performed several searches but I keep finding that the solution for most users is to use DateUtil.convertDate which in my case appears to be the problem.
I have a simple Mapper transformer that takes the date from OBR7.1 which is the actual datetime of the exam
DateUtil.convertDate("yyyyMMddhhmm","yyyy-MM-dd HH:mm", msg['OBR']['OBR.7']['OBR.7.1'].toString())
Example
the value in OBR7.1 is 20150313202208. it is being mapped as 2015-03-15 08:48. But the value should have been 2015-03-13 8:22. I have a few dozen examples of this across several channels.
Why is it off in both days and minutes?
DateUtil.convertDate is returning an incorrect date value
0 commentaires:
Enregistrer un commentaire