Forum Discussion

amit_saroha's avatar
amit_saroha
New Contributor III
4 years ago
Solved

Date Issue

Hi All, I have 3-4 date columns with not null and with null date values in mm/dd/yyyy format. I have used the below expression in mapper snap to format the date but facing the below issue. Could an...
  • SpiroTaleski's avatar
    4 years ago

    @amit.saroha

    If you need to handle both scenarios(with null and without null date values), probably you will need first to check if ‘Actual termination date’ is not null then do the date parsing and formatting, otherwise send null(or any other value in case Actual termination date is null).

    $.hasPath("['Actual termination date']") ? Date.parse($[‘Actual termination date’]).toLocaleDateString({“format”:“yyyy-MM-dd”}) : "any other value in case actual termination date is null"

    BR.
    Spiro Taleski