Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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.


Comment on Re: garbage at end of string in strptime
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019002]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2015-07-04 23:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls