Skip to content

Parsing variable-length fractional seconds using strptime #1006

Answered by aborruso
Alch-Emi asked this question in Q&A
Discussion options

You must be logged in to vote

Or using simply strptime

echo stamp="2022-04-03 17:38:20.028 UTC" | mlr put '$unixtime = strptime($stamp, "%Y-%m-%d %H:%M:%S.%f UTC")'

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@johnkerl
Comment options

@aborruso
Comment options

@Alch-Emi
Comment options

@johnkerl
Comment options

Answer selected by Alch-Emi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants