Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: garbage at end of string in strptime

by Khen1950fx (Canon)
on Feb 16, 2013 at 03:39 UTC ( #1019002=note: print w/replies, xml ) Need Help??


in reply to garbage at end of string in strptime

The error message is telling you exactly what the error is: you have an extra 2 that it can't format. For example, an example with garbage 2:
#!/usr/bin/perl -l use strict; use warnings; use Time::Piece; my $time = Time::Piece->strptime( "2013-02-15 19:07:292", "%Y-%m-%d %H:%M:%S"); print $time;
Now without the extra 2:
#!/usr/bin/perl -l use strict; use warnings; use Time::Piece; my $time = Time::Piece->strptime( "2013-02-15 19:07:29", "%Y-%m-%d %H:%M:%S"); print $time;
Does that help? If not, please post your code, and we'll go from there.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019002]
help
Chatterbox?
[dpchrist]: How do I test if a scalar contains a typeglob?

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2016-12-04 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (69 votes). Check out past polls.