CSharp examples for System:DateTime
Get date string for JSON object.
using System.Text; using System.Linq; using System.Collections.Generic; using System;//w w w . j a v a 2s.c o m public class Main{ /// <summary>Get date string for JSON object.</summary> public static string GetJsonDate(DateTime date) { return date.Year.ToString() + "/" + date.Month.ToString() + "/" + date.Day.ToString(); } }