mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 05:38:19 +02:00
Auto-generate markdown command docs (#4451)
* Finish updating * a couple improvements * Update renames * cleanup examples
This commit is contained in:
47
docs/commands/into_datetime.md
Normal file
47
docs/commands/into_datetime.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
title: into datetime
|
||||
layout: command
|
||||
version: 0.59.0
|
||||
---
|
||||
|
||||
converts text into datetime
|
||||
|
||||
## Signature
|
||||
|
||||
```> into datetime ...rest --list --timezone --offset --format```
|
||||
|
||||
## Parameters
|
||||
|
||||
- `...rest`: optionally convert text into datetime by column paths
|
||||
- `--list`: lists strftime cheatsheet
|
||||
- `--timezone {string}`: Specify timezone if the input is timestamp, like 'UTC/u' or 'LOCAL/l'
|
||||
- `--offset {int}`: Specify timezone by offset if the input is timestamp, like '+8', '-4', prior than timezone
|
||||
- `--format {string}`: Specify date and time formatting
|
||||
|
||||
## Examples
|
||||
|
||||
Convert to datetime
|
||||
```shell
|
||||
> '16.11.1984 8:00 am +0000' | into datetime
|
||||
```
|
||||
|
||||
Convert to datetime
|
||||
```shell
|
||||
> '2020-08-04T16:39:18+00:00' | into datetime
|
||||
```
|
||||
|
||||
Convert to datetime using a custom format
|
||||
```shell
|
||||
> '20200904_163918+0000' | into datetime -f '%Y%m%d_%H%M%S%z'
|
||||
```
|
||||
|
||||
Convert timestamp (no larger than 8e+12) to datetime using a specified timezone
|
||||
```shell
|
||||
> '1614434140' | into datetime -z 'UTC'
|
||||
```
|
||||
|
||||
Convert timestamp (no larger than 8e+12) to datetime using a specified timezone offset (between -12 and 12)
|
||||
```shell
|
||||
> '1614434140' | into datetime -o +9
|
||||
```
|
||||
|
Reference in New Issue
Block a user