Sunday, May 5, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 9792  / 2 Years ago, sun, october 9, 2022, 9:14:11

When I type date in gnome-terminal, or xterm it reads out in 24 hour time, is there any way to make it use 12 hour. According to date --help using %r should do the trick, but there are no examples given as to how to input that command. I've tried date %r, and date%r but they don't work. It should be noted that my GUI clock on the top panel of my screen is using 12 hour format at the moment.




More From » command-line

 Answers
4

You have to add a "+" before the option like This,



date +%r

[#26858] Tuesday, October 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
algicuade

Total Points: 317
Total Questions: 89
Total Answers: 106

Location: Saint Pierre and Miquelon
Member since Fri, Jan 28, 2022
2 Years ago
;