Created
May 26, 2018 03:05
-
-
Save sysnajar/62e3679914c606d843ffb1108287d385 to your computer and use it in GitHub Desktop.
jq generate Date field from string fields (createDate and createTime)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./list_dopa.lua | jq -c '.data []| {date: (.createDate + .createTime[0:5]) | strptime("%m/%d/%y%H:%M") | mktime , date2: (.createDate + .createTime[0:5]) | strptime("%m/%d/%y%H:%M") | todate, createDate: .createDate, createTime :.createTime, id : ._id}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment