date to-record for date> date to-record {flags} 
| input | output | 
|---|---|
| datetime | record | 
| string | record | 
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
╭────────────┬───────────╮
│year│2020│
│month│4│
│day│12│
│hour│22│
│minute│10│
│second│57│
│nanosecond│123000000│
│timezone│+02:00│
╰────────────┴───────────╯
Convert a date into a record.
>'2020-04-12 22:10:57 +0200'|into datetime|date to-record
╭────────────┬────────╮
│year│2020│
│month│4│
│day│12│
│hour│22│
│minute│10│
│second│57│
│nanosecond│0│
│timezone│+02:00│
╰────────────┴────────╯
    Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
    https://www.nushell.sh/commands/docs/date_to-record.html