Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 543

Using JQ to parse timestamp

$
0
0

I am having some difficulty finding my error with JQ parsing this timestamp.

"time": "2024-05-13 16:43:06.928708"

.time| strptime("%Y-%m-%d %H:%M:%S.%f")| strftime("%Y")

It clearly is not agreeing that I have this format, however this is exactly the format I'm using in Python.

here is the error message received."2024-05-13 16:43:06.928708" does not match format "%Y-%m-%d %H:%M:%S.%f"

What gives, do I need some ticks somewhere?


Viewing all articles
Browse latest Browse all 543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>