I want to check whether the data coming from loop in p-table is of string type or date type
I have a key named newValue
whose value can be either newValue: "Percentage"
or newValue: "2021-03-25T15:55:42.136Z"
If its date I want to show the data as "3/25/21, 9:25 PM"
else normal string "Percentage"
<td style="width: 10%;">
{{rowData?.histories.newValue ? getDateorStringValue(rowData?.histories.newValue) : 'N/A'}}
</td>
getDateorStringValue(...)
is the function I am using any idea how to achieve this?