You can use "ImportResultsSummary" object via WSProxy or follow the documentation to do that with SOAP API Call.
<script runat="server">
Platform.Load("core","1");
try {
var prox = new Script.Util.WSProxy();
var cols = [
"ImportDefinitionCustomerKey",
"ImportType",
"ImportStatus",
"ID",
"ObjectID",
"NumberDuplicated",
"NumberErrors",
"NumberSuccessful",
"DestinationID",
"TaskResultID"
];
var filter = {
Property: "ImportDefinitionCustomerKey",
SimpleOperator: "equals",
Value: "xxxx" /* Paste here External Key*/
};
var result = prox.retrieve("ImportResultsSummary", cols, filter);
Write("Result: " + Stringify(result));
} catch(e) {
Write("An error has occurred: " + Stringify(e));
}
</script>
However, as you can see there is no CreatedDate
available to retrieve, and based on the documentation it is only mentioned in the part "SOAP Request For Import Definiton Creation" and "SOAP Envelope to Create Import Definition with MapByOrdinal".
Moreover, when you would execute the code from above, you would actually retrieve the CreatedDate
field but with only default value = 0001-01-01T00:00:00.000
, thus it probably means that if you create ImportDefinition manually, then CreatedDate
equals the default value and when via API call it would be equal to the time specified by you.