Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Obtaining the Insertion Date in Code
B_Looser
Greetings,
I am trying to obtain an asset's "Inserted Date" with the MBAsset class.
Presently, we can obtain the Modification Date by using
Dim mobjAsset As MBAsset
AssetChangedDate = CDate(mobjAsset.ModificationDate)
However, there does not appear to be an easy way to obtain the Insertion Date.
Can someone please let me know how this is done.
Thank you,
Jim
Find more posts tagged with
Comments
kg_brian
You are right.. when looking at an asset, the modificationDate is directly stored as a piece of metadata. However for InsertionDate.. you need to dive deeper into the API. Other than the 12 or so standard pieces of metadata stored with an asset.. is an array containing all the metadata values.. called MBMetadata.
In java would like look
MBAsset mbass = service.getAsset(guid-of-asset);
MBMetadata[] metaArr = mbass.getMBMetadata();
Then metaArr is an array of all your metadata.. one of those elements will have a name and guid that matches what you are looking for (in this case Insertion Date). Can iterate through it to find what you are looking for... we can call a getMName() and look for a match to insertion date.. and then when we find it, use a getMValue() to get the date.