0

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

you have GNU date?

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

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.