Explore the date command

Rohit Jain
2 min readSep 24, 2021

In this article, we will discuss some interesting options in the date command :)

So let's begin:-

The date command is used to display the system date and time. By default, the date command displays the date in the time zone on which the Linux operating system is configured. It is most commonly used to print the date and time in different formats and calculate future and past dates.

Let’s start to explore the date options :)

  • +%D – Display date as mm/dd/yy
  • +%Y – Year (e.g., 2020)
  • +%m – Month (01-12)
  • +%B – Long month name (e.g., September)
  • +%b – Short month name (e.g., Sep)
  • +%j – Day of year (001-366)
  • +%u – Day of week (1-7)
  • +%A – Full weekday name (e.g., Friday)
  • +%H – Hour (00-23)
  • +%M – Minute (00-59)
  • +%S – Second (00-60)

So That's all for today :)

I hope you like my article, I very thank full to you to read my article. :)

--

--