Datetimes for manually uploaded fields

chjlarson
chjlarson ✭✭✭✭
edited March 2022 in Compliance & Reporting
Hi, I know that the current date can be used in queries when interacting with asset metadata, such as _createdOn, e.g.:
Find aws_instance that has orca_cve with ._createdOn > date.now-1hour
Would this work for datetimes that we upload as fields ourselves?

Best Answer

  • dcpeach
    dcpeach ✭✭✭✭✭
    Answer ✓
    As long as the values are stored as an epoch number in milliseconds with the following format it should work!

    date(YYYY)
    date(YYYY-MM)
    date(YYYY-MM-DD)
    date(YYYY-MM-DDThhTZD)
    date(YYYY-MM-DDThh:mmTZD)
    date(YYYY-MM-DDThh:mm:ssTZD)
    date(YYYY-MM-DDThh:mm:ss.sTZD) 
    

This Month's Leaders