How to properly parse a dateTime string with milliseconds in TIBCO ActiveMatrix BusinessWorks™

When parsing a dateTime string in TIBCO ActiveMatrix BusinessWorks™ make sure to check the presence of milliseconds. However when the milliseconds are precisely ‘000’ like in in the example ‘20150508093620000’, parsing will surprisingly not result in any exceptions.

Situation that will work:
Despite the fact that milliseconds are present (‘000’) this operation will still work without exceptions.


Situation that will fail:
When milliseconds are not taken into account and the dateTime contains a value which is not equal to ‘000’ the operation will not work and lead into an exception.


The addition of ‘SSS‘* in capital letters will make sure to take the milliseconds into account while parsing a dateTime string.


*A String containing a format describing how the date should be formatted. e.g. “yyyy-MM-dd HH:mm:ss”, “EEE, yyyy-MM-dd HH:mm:ss.SSS Z”. SSS (3 S) is required for formating millisecond. i.e. “yyyy-MM-dd HH:mm:ss.SSS” is correct, but “yyyy-MM-dd HH:mm:ss.S” is not valid. (source:


One comment

  1. Reblogged this on anz.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: