Is sysdate July 21, 2004 1:12:54 PM unparseable?
I tried selecting the value from database but it turned out to be 2007-07-21.
Then I used
tmp['PID']['PID.44']['PID.44.1'] = DateUtil.convertDate("yyyy-MM-dd", "yyyyMMdd", msg['roomcharge'].toString());

I must convert it in this format yyyyMMddHHmiss like 19870429220554 compromising to HL7.
Does anybody has a clue?
Thanks in advance!!!