Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Get current time using Joda time format

by ravi45722 (Pilgrim)
on Mar 24, 2017 at 10:17 UTC ( [id://1185746]=note: print w/replies, xml ) Need Help??


in reply to Re: Get current time using Joda time format
in thread Get current time using Joda time format

my $t = Time::Piece->strptime("Friday 24rd Mar, 2017", "%A %drd %b, % +Y"); print $t->strftime("%a %b %d %H:%m:%s %Y");

gives something like this

 "Fri Mar 24 11:54:55.234 2017"

But I need that as print

 $t->strftime("EEE MMM dd HH:mm:ss.SSS yyyy");

Is there any module like that????

I dont have unix format. I have only joda time format string

Replies are listed 'Best First'.
Re^3: Get current time using Joda time format
by hippo (Bishop) on Mar 24, 2017 at 10:53 UTC

    It isn't clear to me how your problem hasn't been solved here, sorry. Perhaps you could re-state it in the form of a test so that everyone can see the issue? See How to ask better questions using Test::More and sample data for how to present that. Once we can understand what you are asking we will be better positioned to suggest some solution.

    Update: A thought: is it the case that you aren't interested in formatting the time but actually you want to re-format the format? ie. convert from Joda format specifiers to strftime specifiers?

Log In?
Username:
Password:

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

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

    No recent polls found