To Javascript Date String - CSharp System

CSharp examples for System:DateTime Format

Description

To Javascript Date String

Demo Code


using System;//from   w  ww .j  a  va 2 s .c o  m

public class Main{
        public static string ToJsDateString(this DateTime date)
        {
            return date.ToString("yyyy-MM-dd");
        }
}

Related Tutorials