W3cubDocs

/Nushell

date to-table for date

Convert the date into a structured table.

Signature

> date to-table {flags}

Input/output types:

input output
datetime table
string table

Examples

Convert the current date into a table.

>date to-table

Convert the date into a table.

>date now|date to-table

Convert a given date into a table.

>2020-04-12T22:10:57.000000789+02:00|date to-table
╭───┬──────┬───────┬─────┬──────┬────────┬────────┬────────────┬──────────╮
# │ year │ month │ day │ hour │ minute │ second │ nanosecond │ timezone │
├───┼──────┼───────┼─────┼──────┼────────┼────────┼────────────┼──────────┤
02020412221057789+02:00
╰───┴──────┴───────┴─────┴──────┴────────┴────────┴────────────┴──────────╯

Convert a given date into a table.

>'2020-04-12 22:10:57 +0200'|into datetime|date to-table
╭───┬──────┬───────┬─────┬──────┬────────┬────────┬────────────┬──────────╮
# │ year │ month │ day │ hour │ minute │ second │ nanosecond │ timezone │
├───┼──────┼───────┼─────┼──────┼────────┼────────┼────────────┼──────────┤
020204122210570+02:00
╰───┴──────┴───────┴─────┴──────┴────────┴────────┴────────────┴──────────╯

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/date_to-table.html