Skip to Content
gnux

-d, --date

Display time described by STRING, not 'now'.

An option of datex.

Usage

datex -d STRING [+FORMAT]
datex --date=STRING [+FORMAT]

Details

ShortLongValueDefaultMeaning
-d--dateSTRINGdisplay time described by STRING, not 'now'

Examples

Stamp a log line with a precise, sortable time

datex -Iseconds

Read a Unix timestamp you found in a log or a database

datex -u -d @1700000000

Find the date three days ago, to clean up older files

datex -d '3 days ago' +%F

Find the date of next Friday for a deadline

datex -d 'next friday' +%A,%F

Help in the terminal

gnux help datex --date

On this page