Forum Moderators: bakedjake

Message Too Old, No Replies

Shell command to get time in HH:MM

         

runner

3:10 am on Mar 22, 2005 (gmt 0)

10+ Year Member



How can I get the time in HH:MM and not display seconds?

date '+%T' gives me HH:MM:SS and I don't want seconds. I'm pulling my hair out trying to figure out a way to get rid of the seconds.

I've read the date man pages and the format HHMM only prints out the literal characters "HHMM"

This can't be that difficult.

runner

3:17 am on Mar 22, 2005 (gmt 0)

10+ Year Member



I figured it out...

date '+%H:%M'