Solved
add plus minutes to a date time value with the jolt transform json processor
Hi all,
I want to add 15 minutes to a date-time value using the transform json processor, but with my configuration I get the same value as before. I expect for the end field to have 15 minutes more than the start field. Does anyone have any idea?
[ {
"store_id" : 1001,
"date" : 20220918,
"start" : "2022-09-18 00:15:00",
"end" : "2022-09-18 00:15:00",
"out" : 0
}, {
"store_id" : 1001,
"date" : 20220918,
"start" : "2022-09-18 00:30:00",
"end" : "2022-09-18 00:30:00",
"out" : 0
}]
My jolt Specification
[
{
"operation": "modify-overwrite-beta",
"spec": {
"*":{
"end": "=${end:toDate('yyyy-MM-dd HH:mm:ss'):toNumber():plus(900000):format('yyyy-MM-dd HH:mm:ss')}"
}
}
}
]
The result is the same
[ {
"store_id" : 1001,
"date" : 20220918,
"start" : "2022-09-18 00:15:00",
"end" : "2022-09-18 00:15:00",
"out" : 0
}, {
"store_id" : 1001,
"date" : 20220918,
"start" : "2022-09-18 00:30:00",
"end" : "2022-09-18 00:30:00",
"out" : 0
}

