jpg-130 commented on issue #10457:
URL: https://github.com/apache/pinot/issues/10457#issuecomment-2141266743

   I am answering my own question here, but I found the way using [UDF with 
groovy 
script.](https://docs.pinot.apache.org/v/release-0.9.0/users/user-guide-query/scalar-functions#groovy-scripts)
   
   I have just subtracted the offset in milliseconds for 30 minutes from 
timestampEpoch, assuming timestampEpoch is a long value in epoch millisecond 
for my use case. 
   You can handle any custom requirement that you want to in this manner.
   
   
`DATETIMECONVERT(groovy('{"returnType":"LONG","isSingleValue":true}','arg0-1800000',
 
timestampEpoch),'1:MILLISECONDS:EPOCH','1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd
 HH:mm:ss','1:HOURS')`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to