Skip to main content

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)

 

Apologies for the image, but it's disagreeing with the forum editor if I paste it in


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


 


Apologies for the image, but it's disagreeing with the forum editor if I paste it in


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



 


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


Reply