nushell/docs/commands/date_now.md
Justin Ma 42f1874a3a
Update some examples and docs (#4682)
* Update some examples and docs

* Update now.rs

* Update date_now.md

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-03-01 08:05:29 -05:00

34 lines
525 B
Markdown

---
title: date now
layout: command
version: 0.59.0
---
Get the current date.
## Signature
```> date now ```
## Examples
Get the current date and display it in a given format string.
```shell
> date now | date format "%Y-%m-%d %H:%M:%S"
```
Get the time duration from 2019-04-30 to now
```shell
> (date now) - 2019-05-01
```
Get the time duration since a more accurate time
```shell
> (date now) - 2019-05-01T04:12:05.20+08:00
```
Get current time in full RFC3339 format with timezone
```shell
> date now | debug
```