I have a bad date output:

Mon Jan 20 17:03:25 CST 2014

Is there a tool/function or whatever to convert this string to a more usefull format? Like yyymmdd or something like that.

The output is a string so I have to manipulate it afterwards.

Thanks in advance


1 Answer 1


you have GNU date?

$ date -d"Mon Jan 20 17:03:25 CST 2014" +%Y%m%d

my server is in HKT, that's why it shows 21st Jan

  • oh yeah thats it. I can use gdate.
    – M.S.
    Nov 16, 2016 at 9:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .