you can write an extension method for the datetime and use it where necessary as in the following:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Test_DatetimeFormat
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(DateTime.Today.ToMyFormat());
}
}
static class Utils
{
public static string ToMyFormat(this DateTime dt)
{
return dt.ToString("yyyy/MM/dd");
}
}
}