Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Deprecated
    • Env
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

date to-record for deprecated

Convert the date into a record.

Signature

> date to-record {flags}

Input/output types:

inputoutput
datetimerecord
stringrecord

Examples

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 │
╰────────────┴────────╯
Edit this page on GitHub
Contributors: JT, Justin Ma, Leon, Hofer-Julian, Texas Toland, sholderbach