Get Date Time - CSharp System

CSharp examples for System:DateTime Calculate

Description

Get Date Time

Demo Code


using System.Globalization;
using System.Text.RegularExpressions;
using System.Web;
using System.Linq;
using System.Collections.Generic;
using System;/*from w  w  w.j  a v  a  2s.  c  om*/

public class Main{
            public static string GetDateTime()
            {
                return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            }
}

Related Tutorials