If you want to display the date and time on your Mac Terminal, you can make use of the date command.
Example:% date
Thu Sep 6 11:56:15 EST 2023
If you wish to change the date and time of your Mac device, you can make use of the same date command with elevated privileges as follows,
Change Date and Time
% sudo date 090712002023.30
Password:
Thu Sep 7 12:00:30 EST 2023
The date/time format string: mmddHHMMyyyy.ss
Format | Description | Valid Values |
---|---|---|
mm | Month (01-12) | 01 to 12 |
dd | Day (01-31) | 01 to 31 |
HH | Hour (00-23) | 00 to 23 |
MM | Minute (00-59) | 00 to 59 |
yyyy | Year (e.g., 2021) | Any valid year |
ss | Second (00-61) | 00 to 61 (allowing for leap seconds) |

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to MacOS,
- How to Display Analog Clock on Mac Menu Bar
- Shutdown Mac Terminal Command
- How to know the Serial Number of MacBook on macOS Ventura 13.0
- macOS: Remove Desktop or Documents Folder from iCloud Drive Syncing
- [fix] How to Show file extensions on all files on Mac
- How to install Zoom Add-in to Outlook (Mac)
- How to turn off Stage Manager - macOS Ventura
- Fix - Xode - Internal logic error: Connection was invalidated
- How to do calculations in Mac Terminal
- How to delete a Page in Microsoft Word File on Mac (macOS)
- How to Refresh Mac Desktop
- How to install Java on macOS [Big Sur]
- How to Disable Mac Terminal Bell Sound
- Installing MongoDB on Linux/Unix/macOS/Ubuntu
- How to Uninstall Brew on Mac
- Find your macOS version
- Change TextEdit File Encoding
- AppleScript Example with TextEdit
- How to install homebrew (brew) on M1 Mac
- How to Find File and Directory Size in Mac Terminal
- How to open new tab in Sublime Text Editor [macOS]
- How to list all users in Mac Terminal
- Turn off Auto-Capitalization on macOS Ventura 13
- How to check Command Line Tools Version [Updated for Ventura]
- Change Current User Password using Mac Terminal Command
More Posts:
- Java 8 Predicate default and() function Example - Java
- StringJoiner Example with Java Collections - Java
- Java 8: Steam map with Code Examples - Java
- Get Current time in GMT/UTC using JavaScript - JavaScript
- How to display hidden files in Eclipse (dot prefixed files) - Eclipse
- Installing MongoDB on Linux/Unix/macOS/Ubuntu - MacOS
- How to Change AWS Default Region using CLI - AWS
- Android SecurityException: Need BLUETOOTH ADMIN permissicacheNameAndAddresson: Neither user 10123 nor current process has android.permission.BLUETOOTH_ADMIN - Android