Parse a custom-formatted date string.
Section: Dates and Time
Parse custom date format
bash
bash
echo '"2025-01-15 12:34:56"' | jq 'strptime("%Y-%m-%d %H:%M:%S")'Explanation
Returns a time array, which you can convert with `mktime`.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Dates and Time