There is two field in Root.MQMD: PutDate and PutTime and I think I will store these values into a database. But why put into two columns when databases supports Timestamp columns.
I had no success: I can't create a single Timestamp value in ESQL from types Date and Time.
-- MQMD PutDate and PutTime format can be view via Trace node ${Root}
-- MQMD.PutDate format = DATE 'ccyy-mm-dd'
-- MQMD.PutTime format = GMTTIME 'hh:mm:ss.mmm'
-- MQSI ESQL TIMESTAMP format = TIMESTAMP 'ccyy-mm-dd hh:mm:ss'
declare db2Format timestamp;
set db2Format =
substring(cast(Root.MQMD.PutDate as char) from 7 for 10) || ' ' ||
substring(cast(Root.MQMD.PutTime as char) from 10 for ;
insert into Database.test (tst_timestamp) values (db2Format);
I had tried a similar ESQL code, but I concatenated the casting date and time values without substring(). Just I thought there exists an evident solution - from date and time to timestamp...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum