How to show date in top bar of deskop in ubuntu 18.04 LTS? [duplicate]

I've found 2 ways to do this.

  1. from the command line

    dconf write /org/gnome/desktop/interface/clock-show-date 'true'
    

or

  1. Install gnome-tweaks and in it there is a setting to show the day/date along with the time in the top bar. To install, do:

    sudo apt install gnome-tweak-tool
    

After the install, when you run tweaks, you will see on the far left column "Top Bar". Click on that and you'll see the options on the rigth. Turn the one "ON" under clock where it says "Date".