W3cubDocs

/Nushell

date to-record for date

Convert the date into a record.

Signature

> date to-record {flags}

Input/output types:

input output
datetime record
string record

Examples

Convert the current date into a record.

>date to-record

Convert the current date into a record.

>date now|date to-record

Convert a date string into a record.

>'2020-04-12T22:10:57.123+02:00'|date to-record
╭────────────┬───────────╮
year2020
month4
day12
hour22
minute10
second57
nanosecond123000000
timezone+02:00
╰────────────┴───────────╯

Convert a date into a record.

>'2020-04-12 22:10:57 +0200'|into datetime|date to-record
╭────────────┬────────╮
year2020
month4
day12
hour22
minute10
second57
nanosecond0
timezone+02:00
╰────────────┴────────╯

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