on 02-25-2015 3:51 PM
Hi Folks,
I have a req where the input date format yyyy-dd-MMTHH:mm:ss should be to convert MM/dd/yyyy.
I am using the datetrans function to achieve this..but its failing in pi
ex:<mo:EventTimeStamp>2014-12-03T14:16:20</mo:EventTimeStamp>
but it fails with runtime error Illegal pattern character 'T'
Can anyone help me how to achieve this ?if there is any udf ,please post me here
Regards,
Kalyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solution by Giridhar is a possible solution too.
But you might want to learn why your earlier config was not working, when it is really possible for it to work. It might come in handy in the future when you have a similar input but your output requires the HHmmss part as well.
You know what they say about giving someone a fish and teaching him/her how to fish.
Which java version you have installed on PI host?
different java versions has diffrent handling for timezones.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kalyan,
Why don't skip with a substring function for example the T character previous the datetransfunction?
You can try with these suggestions as well java - How can I convert a timestamp from yyyy-MM-ddThh:mm:ss:SSSZ format to MM/dd/yyyy hh:mm:ss.SSS..., but i think to ommit the T or Raghu suggestion should be enough.
Regards.
You really don't need a UDF for this. The input/output format for your DateTrans function might incorrectly configured to match your actual input values.
Please provide following screenshots:
- your configuration for DateTrans
- the Display Queue value of the input before DateTrans
- the error message you are getting
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.