how to convert date variable from mm/dd/yyyy to dd/mm/yyyy c# code example
Example 1: c# date to string yyyy-mm-dd
var date_string = date.ToString("yyyy-MM-dd");
Example 2: Convert a date to yyyy mm dd format
const formatYmd = date => date.toISOString().slice(0, 10);
formatYmd(new Date());