COLLAPSE ALL
  • Home
  • About Pixie
    • Pixie Overview
    • Data Sources
    • How Pixie uses eBPF
    • Roadmap
    • FAQ
    • Troubleshooting
  • Installing Pixie
    • Requirements
  • Using Pixie
    • Using the Live UI
    • Using the CLI
    • Using the API
  • Tutorials
  • Reference
    • Architecture
    • PxL
      • Compile Time Functions
        • px.days
        • px.equals_any
        • px.format_duration
        • px.hours
        • px.make_upid
        • px.microseconds
        • px.milliseconds
        • px.minutes
        • px.now
        • px.parse_duration
        • px.parse_time
        • px.script_reference
        • px.seconds
        • px.strptime
        • px.uint128

px.strptime

Parse a datestring into a px.Time.

Parse a datestring using a standard time format template into an internal time representation. The format must follow the C strptime format, outlined in this document: https://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html

Arguments

NameTypeDescription
date_stringstringThe time as a string, should match the format object.
formatstringThe string format according to the C strptime format https://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html

Returns

px.Time: The time value represented in the data.

Examples

time = px.strptime("2020-03-12 19:39:59 -0200", "%Y-%m-%d %H:%M:%S %z")

This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.