0

I want the date format Thu Nov 3 17:21:08 2016 to be converted to Thursday, 3 November 2016 7:48:24 PM AEDT .

Actually, i want to achieve in converting the 12hrs time to 24hrs format using a shell script .

Thanks

  • 4
    Then get to work. We can't help you if you don't show some sort of coding effort. – DejaVuSansMono Nov 03 '16 at 13:23
  • I am basically writing a script to compare the file from a location with the current date to know when is it created . When i schedule to run this script with a job which is another unix box which has different locale settings which when run this script - it takes its date format with time in AM/PM . – Uma Shankar Nov 03 '16 at 13:26
  • 1
    I understand the problem. StackOverflow is not a code writing service though. It's a "I've written this, tried this this and this and it doesn't work. My desired behavior is this and it's doing this."..Sort of site. That being said, this might get you started. http://stackoverflow.com/questions/1401482/yyyy-mm-dd-format-date-in-shell-script – DejaVuSansMono Nov 03 '16 at 13:28

1 Answers1

-1

I believe below command would help you to go ahead:

date +"%T" 
Benjamin W.
  • 46,058
  • 19
  • 106
  • 116
  • But that just gives me the time format in AM/PM when executing the job ... So i need the Time format to be converted from AM/PM to 24hrs .. – Uma Shankar Nov 03 '16 at 13:36