P is for Practical | |
PerlMonks |
Re: Date parsingby Albannach (Monsignor) |
on May 17, 2001 at 23:55 UTC ( [id://81357]=note: print w/replies, xml ) | Need Help?? |
Sometimes split is overkill:
print substr('2001-05-17 14:40:00.123',11,5) gives you 14:40, and as this looks like a very fixed (stable) format, I see no reason not to rely on the column positions, though you may want to verify that. --
In Section
Seekers of Perl Wisdom
|
|