How to change date format on menu bar without extra apps?

I don't know whether you ever got the above method to work, but it never did the trick for me. However, I seem to have found a way that works without resorting to a 3rd party app. I was pulling my hair out about this because I wanted to have a '.' as the time separator, and even when using the defaults command like so:

defaults write com.apple.menuextra.clock "DateFormat" "EEE MMM d  H.mm"

It would successfully assign the value, but every time I killed the menu bar, it would inexplicably revert to the default format. I'm not sure how permanent this will be, but I did a quick loop in bash and after running it for a few seconds, I killed the menu bar from a separate shell, and then returned to the loop and killed it - voilà!

So, basically from shell 1:

while true;

    > do;
    > defaults write com.apple.menuextra.clock "DateFormat" "EEE MMM d  H.mm";
    > done;

...then in another shell:

killall -KILL SystemUIServer

And then return to the first shell and kill the loop. I haven't restarted yet, but so far the change has stuck. HTH!


There is a specific Pref Pane for the menu bar Clock settings, separate to the Dates pref, which is for how dates are shown in Finder.
System Prefs > Date & Time > Clock

You can also access it directly by clicking the menu bar Clock, or typing "date" into Prefs search

enter image description here

enter image description here

enter image description here