Jim Spath wrote:
Bland Chuck-CNGR85 wrote:
I have a file I am processing with PERL. Each line starts with:

2009/11/12 05:21:33.394

I want to convert this DateTime info to standard epoch seconds.

Does such code already exist or will I be writing something?

Thanks in advance,

Chuck Bland

I would use Date::Calc's Date_to_Time() or DateTime::Format::Strptime with a pattern value of "%F %T".

Actually, the correct pattern to use for DateTime::Format::Strptime would be:

%Y/%m/%d %T

Sorry about that.

- Jim

Reply via email to