How to format a date

How to format a date

Hi ,
I don't manage to convert a date in 15/12/2023 format to 2023-12-15.
I've tried using the toDateTime function without success.

  1.     dueDate0 = echeancierList.getJson("Echeance_dt");
  2.     dueDate = toDateTime(dueDate0,"yy-MM-d");

Any help would be appreciated.