Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^6: Formatting dates while parsing CSV

by BigRedEO (Acolyte)
on Jun 14, 2016 at 15:50 UTC ( [id://1165610]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Formatting dates while parsing CSV
in thread Add leading zeros to days/months in dates while parsing CSV

So just adding the "(0) x3" will add zeros to any empty date fields, but format if there is an actual date?
  • Comment on Re^6: Formatting dates while parsing CSV

Replies are listed 'Best First'.
Re^7: Formatting dates while parsing CSV
by soonix (Canon) on Jun 14, 2016 at 20:32 UTC
    it appends a list of three elements (each containing a zero). So if the split returns a list of three, you end up with six elements (where you take the first three and ignore the rest); if there's nothing to split, you end up with the three freshly appended zeroes.

    Probably exactly what you want.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found