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 (Archbishop) 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?