I am trying to calculate the actual datetime using the offset value present in my field.
I am currently calculating the sc-occurredOn-actual value using below piece of code.
"return doc['occurredOn'].value.getMillis() + 18000000 (5 hours difference)"
I want to remove the hard coded value of 18000000 as the time difference from next month will be 6 hours instead of 5. How can I achieve this automatically using the offset value ?