javelin9999 Absent Member.
Absent Member.
554 views

Flexconnector - What is the right Date-time format for this?

Hey guys, this is probably super easy, but I can't find anything in the flexconnector developer guide or in the forums on how to format a date that looks like the following:

2014-04-02T17:00:09.917Z

Anyone know the right way to set the format settings for this field in the flexconnector config file?

(I would prefer not to use regex if possible)

Thanks, much appreciated.

0 Likes
Reply
3 Replies
balahasan.v1 Acclaimed Contributor.
Acclaimed Contributor.

Re: Flexconnector - What is the right Date-time format for this?

Hi Ryan,

Start with this

regex=(\\d+\\-\\d+\\-\\d+)\\w+(\\d+\\:\\d+\\:\\d+\\.\\d+\\w+)

token[0].name=Date

token[0].type=String

token[1].name=Time

token[1].type=String

event.endTime=__createOptionalTimeStampFromString(__concatenate(Date," ",Time))

event.deviceCustomString1=__concatenate(Date," ",Time)

0 Likes
Reply
javelin9999 Absent Member.
Absent Member.

Re: Flexconnector - What is the right Date-time format for this?

Thanks Balahasan,

I was hoping there was a format already supported without having to use regex. Looks like it is the only way.

0 Likes
Reply
balahasan.v1 Acclaimed Contributor.
Acclaimed Contributor.

Re: Flexconnector - What is the right Date-time format for this?

Hi Ryan,

I was using Token Operations and Regex Flex there...r u trying this in different Flex Connector Type... U can do it with Token operations but to feed the tokens u need that Token mapped with regex.. If u r trying to set this defualt in agent Configuration that won't be possible as far i know... I don't know whether anyone cracked the agent.properties and set the default field mappings

0 Likes
Reply
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.