murex Shell Docs

Command Reference: datetime

A date and/or time conversion tool (like printf but for date and time values)



Pass date/time value as a parameter:

datetime --in "format" --out "format" --value "date/time" -> <stdout>

Read date/time value from STDIN:

<stdin> -> datetime --in "format" --out "format" -> <stdout>


Output current date and time:

» datetime: --in "{now}" --out "{go}01/02/06 15:04:05"
12/08/21 22:32:30

Convert STDIN into epoch:

» echo "12/08/21 22:32:30" -> datetime: --in "{go}01/02/06 15:04:05" --out "{unix}"

Convert value passed as a command line argument:

» datetime: --value "12/08/21 22:32:30" --in "{go}01/02/06 15:04:05" --out "{unix}"



Date Time Format Code Parsers

datetime supports a number of parsers, defined in curly braces.

{py}: Python strftime / strptime format codes

murex doesn’t support all the language and locale features of Python, instead defaulting to English. However enough support is there to cover most use cases.

Documentation regarding these format codes can be found on

{go}: Go (lang) time.Time format codes

murex has full support for Go’s date/time parsing.

Documentation regarding these format codes can be found on

{now}: Current date and time

This is only supported as an input. When it is used --value flag is not required.

See Also

This site's content is rebuilt automatically from murex's source code after each merge to the master branch. Downloadable murex binaries are also built with the website.

Last built on Thu Oct 13 08:08:18 UTC 2022 against commit ed6b6fced6b6fc609f4be93c5d3348695a762facfecf48f.

Current version is 2.11.2200 which has been verified against 16798 tests cases.