Runtime Field - How to create a field (scripted field)

Hi,

I have a date value:
@timestamp: 2024-04-01T12:08:00:548Z

I want to use the scripted field / runtime field option to creat a new field based on the logic below:

IF @timestamp >= 10 minutes
Then
ten_minute_breach = “yes”
else “no”

Finding it difficult to get this working

Any advice or help
Thanks!

hi @ek9boy

where is the @timestamp value stored?
I'm asking this as runtime field painless can only access document level information, unless hardcoded in the script itself.