Can a dateformat transform handle static value "none"?

While going through dateformat I felt what if we can add a static value “none” like we do in firstvalid transform"

For e.g. the below transform gives the lastlogon AD Date, it displays empty space if there is no value present in lastlogon AD attribute. What if we want to display “none” instead of empty space. I tried putting “defaultValue”: “none”, didn’t work.

Any expert thoughts how this can be achieved.

{
“id”: “”,
“name”: “ADLogonTest”,
“type”: “dateFormat”,
“attributes”: {
“inputFormat”: “EPOCH_TIME_WIN32”,
“outputFormat”: “yyyy-MM-dd”,
“defaultValue”: “none”
},
“internal”: false
}

Thank you

Hi Rita,
Did you try to use first valid. You can put the last logon as first input and static none as second.

Thanks,
Sreejith

1 Like

Hi @j1241,

You can use the transform below. With this, you can achieve the desired result.

{
“attributes”: {
“values”: [
{
“attributes”: {
“inputFormat”: “EPOCH_TIME_WIN32”,
“outputFormat”: “yyyy-MM-dd”
},
“type”: “dateFormat”
},
{
“attributes”: {
“value”: “none”
},
“type”: “static”
}
]
},
“type”: “firstValid”,
“name”: "dateFormat_First Valid Transform "
}

Thank You!

7 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.