Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

date now for date

Get the current date.

Signature

> date now {flags}

Input/output types:

inputoutput
nothingdatetime

Examples

Get the current date and format it in a given format string.

> date now | format date "%Y-%m-%d %H:%M:%S"

Get the current date and format it according to the RFC 3339 standard.

> date now | format date "%+"

Get the time duration since 2019-04-30.

> (date now) - 2019-05-01

Get the time duration since a more specific time.

> (date now) - 2019-05-01T04:12:05.20+08:00

Get current time and format it in the debug format (RFC 2822 with timezone)

> date now | debug