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
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

polars selector datetime for expression

Select all datetime columns. Optionally filter by time unit (ns, us, ms) and/or timezone.

Signature

> polars selector datetime {flags}

Flags

  • --time-unit {list<string>}: Filter by time unit(s): ns (nanoseconds), us (microseconds), ms (milliseconds).
  • --time-zone {list<string>}: Filter by timezone(s). Use "*" to match any set timezone, or "unset" to match columns without a timezone.

Input/output types:

inputoutput
anypolars_selector

Examples

Create a selector for all datetime columns

> polars selector datetime

Create a selector for nanosecond or microsecond datetime columns

> polars selector datetime --time-unit [ns us]

Create a selector for nanosecond datetime columns with UTC timezone

> polars selector datetime --time-unit [ns] --time-zone [UTC]