Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: Using Time::Piece Strptime

by GrorkGnom (Initiate)
on Jan 26, 2016 at 21:29 UTC ( [id://1153710]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Using Time::Piece Strptime
in thread Using Time::Piece Strptime

THANK YOU, THANK YOU, THANK YOU! With all the information you have shown me here and using the CPAN info for strptime and strftime, I've got my date displaying correctly now in my spreadsheet. What a pain!

Here is the final code that did it. I had to do some manipulating to get it to finally work. Incidently, the raw date I was using from the text file is a Julian calendar date. I generated it from a mainframe job that outputs a set of commands to a text file.

my $dfile = 'd1528235.txt'; open my $dfh, '<', $dfile; my $date; while ( <$dfh> ) { chomp; if ( not $date and $date = join '/', /=\((\d\d)(\d\d)(\d\d)/ ) { my $str1 = '$date'; my $date1; $date1 = Time::Piece->strptime($date, '%D, %M, %dhd, %Y') ; my $date2 = $date1->strftime("%A %b %d, %Y"); $worksheet->merge_range('A2:G2',$date2,$format5,);

Log In?
Username:
Password:

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

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

    No recent polls found