Thank you for the suggestion. I finally got this working playing with
changing the formats here: https://www.functions-online.com/strftime.html.
Working line of code: Exec if $raw_event =~
/(^\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/ $EventTime = strptime($1, '%m/%d/%Y
%T');
Thank you to the community for all the help!
Chris
On Tue, Jul 29, 2014 at 12:40 AM, Cameron Kerr <cameron.kerr...@gmail.com>
wrote:
> I would suggest that you leave out strptime for the meantime, and just
> assign $EventTime to $1, at least temporarily. That way, you could be
> confident in that you were actually capturing the correct data.
>
> Do you have 0 or space-padded values? Are the values padded at all (note
> that %m is "(1-12)" according to the manual page for strptime, similarly
> for %d, etc. Note that leading zero's can be parsed with %0m and %0d --
> although these are locale-specific)
>
> Some sample inputs would help us.
>
> Exec if $raw_event =~ /^(\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/ $EventTime
> = strptime($1, '%m/%d/%y %H:%M:%S');
>
> You might prefer the following, which may be a bit more recognisable.
> Given Botond's mention of parser issues with \, I've used [\] instead.
>
> Exec if $raw_event =~ /^(..[.]..[.].... ..:..:..)/ $EventTime =
> strptime($1, '%m/%d/%y %H:%M:%S');
>
> Cheers,
> Cameron
>
> --
> Cameron Kerr <cameron.kerr...@gmail.com>
> See my blog at http://distracted-it.blogspot.co.nz/ (previously
> http://humbledown.org/)
> Skype me on cameron.kerr.nz
>
>
>
> On 29 July 2014 11:35, Chris <didji...@gmail.com> wrote:
>
>> Thanks for helping but i'm still a bust.
>>
>> Exec if $raw_event =~ /^(\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/ $EventTime
>> = strptime($1, '%m/%d/%y %H:%M:%S');
>>
>> Returns Null.
>>
>> Exec if $raw_event =~ /(^\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/ $EventTime
>> = strptime($1, '%m/%d/%y %H:%M:%S');
>>
>> Returns null,
>>
>> Getting more beer and letting debug run...
>>
>> Chris
>>
>>
>> ------------------------------------------------------------------------------
>> Infragistics Professional
>> Build stunning WinForms apps today!
>> Reboot your WinForms applications with our WinForms controls.
>> Build a bridge from your legacy apps to the future.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>> _______________________________________________
>> nxlog-ce-users mailing list
>> nxlog-ce-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
>>
>>
>
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users