Expression in mapper

how to write below expression in snaplogic

least(
IIF(ISNULL(LINEAR_PREMR_DATE),to_Date(‘01/01/4000’,‘mm/dd/yyyy’),LINEAR_PREMR_DATE),
IIF(ISNULL(GO_PREMR_DATE),to_Date(‘01/01/4000’,‘mm/dd/yyyy’),GO_PREMR_DATE),
IIF(ISNULL(VOD_PREMR_DATE),to_Date(‘01/01/4000’,‘mm/dd/yyyy’),VOD_PREMR_DATE))

One possible option:

[LocalDate.parse($.get('LINEAR_PREMR_DATE') || '01/01/4000'),LocalDate.parse($.get('GO_PREMR_DATE') || '01/01/4000'),LocalDate.parse($.get('VOD_PREMR_DATE') || '01/01/4000')].sort().shift()

You may need to reformat the output.

Date.parse(Date.parse(Math.min(($MAX_LINEAR_PREMR_DATE == null ? 64060588800000 : Date.parse($MAX_LINEAR_PREMR_DATE).getTime()),($MAX_GO_PREMR_DATE == null ? 64060588800000 : Date.parse($MAX_GO_PREMR_DATE).getTime()),($MAX_VOD_PREMR_DATE == null ? 64060588800000 : Date.parse($MAX_VOD_PREMR_DATE).getTime()))).toString()).toLocaleDateTimeString({“format”:“MM/dd/yyyy hh:mm:ss aa”})