
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I've built a flexconnector for Microsoft Direct Access, (my first) and its working well, parsing the fields I need except for time. (This is a sdkfilereader.)
Here's the time from the DA log:
2/1/2016 10:28:12 PM
Here's from esm endtime field
As you can see, in ESM it's not adjusting for PM.
From my sdkfilereader.properties file
Here's the token:
token[6].name=ConnectionStartTime
token[6].type=String
Here's the event:
event.endTime=__createOptionalTimeStampFromString(ConnectionStartTime,MM/dd/yyyy HH:mm:ss a)
Any ideas what I'm missing? I thought the "a" took care of am/pm.
Thanks
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The key here is to change the 'HH' to 'hh'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
What you have there looks right (you may need to escape the colons as below), is there any reason you aren't declaring the token as a timestamp to begin with?
token[6].name=ConnectionStartTime
token[6].type=TimeStamp
token[6].format=MM/dd/yyyy HH\:mm\:ss a

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks Richard.
As you suggested I added the back slashes to the event like so:
event.endTime=__createOptionalTimeStampFromString(ConnectionStartTime,MM/dd/yyyy HH\:mm\:ss a)
but the end time still is not reflecting PM after the change: 1 Feb 2016 10:26:18 EST
I originally had the token as a TimeStamp but it did not parse at all. Endtime just showed FlexConnector test machine time (DA log events are from January-Feb) just a minute or two removed from the manager receipt time.
Here's the format line as I originally used it:
token[6].format=MM/dd/yyyy HH:mm:ss a
Thanks again!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
What happens if you map the value to a different timestamp field?
event.deviceCustomDate1=__createOptionalTimeStampFromString(ConnectionStartTime,MM/dd/yyyy HH\:mm\:ss a)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The key here is to change the 'HH' to 'hh'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hey Art.
It worked!
1 Feb 2016 22:26:18 EST
Thanks so much.