Convert Epoch time | TemplateEngine - Render Template

Hi,

Exploring the TemplateEngine action named Render Template.

Trying to convert Epoch time to date and time but not sure how to.

I am getting the Epoch time value from JSON and able to print it through for loop.

But finding it difficult to add the logic in for loop (still learning the coding)

 

Solved Solved
0 3 208
1 ACCEPTED SOLUTION

Apologies for the image, but it's disagreeing with the forum editor if I paste it inSoarAndy_0-1734703156753.png

Obviously swap the integer for your placeholder [Action.thing]

 
Note - Jinja itself uses functions, and not all functions you read on the internet are available in SecOps OOTB.  If you check the IDE you see a file called "JinjaFilters" which includes all the ones we have as of today.  You can (duplicate) and modify "CustomJinjaFilters" if you want to expand this with your own functions.

I can also see 'filter_datetime' which might give you more control on the output

Andy

 

View solution in original post

3 REPLIES 3

Apologies for the image, but it's disagreeing with the forum editor if I paste it inSoarAndy_0-1734703156753.png

Obviously swap the integer for your placeholder [Action.thing]

 
Note - Jinja itself uses functions, and not all functions you read on the internet are available in SecOps OOTB.  If you check the IDE you see a file called "JinjaFilters" which includes all the ones we have as of today.  You can (duplicate) and modify "CustomJinjaFilters" if you want to expand this with your own functions.

I can also see 'filter_datetime' which might give you more control on the output

Andy

 

Image of input and ScriptResult output

SoarAndy_1-1734703248114.png

 

Thank you it help now will try to use in for and if loop as well