Format of Setting a Metadata Date value with Set Metadata Value


#1

When setting a metadata date value manually the format must be:
YYYY-MM-DD HH:MM:SS

But when using the keyword replacement of the metadata date it comes in the format of:
DD MMM YY

This has created an issue for me when I would like to base another metadata date value off the original. An example of this would be using a trigger to add an archive date for an asset based on a metadata value.

Using ‘Set Future Status’ this can be done, but I also wanted to have an email go out on the archive date.

The way I have solved this is with the use of the ‘Set Metadata Value’ action, using a metadata keyword and formatting it to the appropriate format.
%asset_metadata_applications-close^date_format:Y-m-d H:i:%

I think it would be nice to have some documentation of what is required to use ‘Set Metadata Value’ for different metadata types as I just guessed with this based on the JSON API documentation.

Really just posting this here so others can refer to it.


(Bart Banda) #2

This will depend on what keyword you use right? What keyword are you using to get this output?


#3

Sorry this was my mistake.

This issues arose through a combination of how keywords are used and the ability to add custom formats to metadata dates.

I assumed as I was outputting a keyword into a date-field that it would be able to interpret the underlying variable used and just the text provided. After long debugging I realised that I could get it to function with outputting the keyword value like above, but didn’t realised that this could be changed as the default for a metadata value through the schema.

Thanks for your help!

For the future it might be cool to have the ability to copy date values by providing the asset ID without requiring it to be in the appropriate format.