Get Date Time String Format - CSharp System

CSharp examples for System:DateTime Format

Description

Get Date Time String Format

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;// w w  w .ja va  2 s .  c o m

public class Main{
        public static string GetDateTimeStringFormat(this DateTime value)
        {
            return value.ToString("yyyy-MM-dd HH:mm:ss.fff");
        }
}

Related Tutorials