Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 romping around the Monastery: (6)
As of 2014-09-20 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls