To Iso Date Time Str - CSharp System

CSharp examples for System:DateTime Format

Description

To Iso Date Time Str

Demo Code


using System.Runtime.CompilerServices;
using System;//from   w ww .  j  ava  2s . c om
using System.Diagnostics.CodeAnalysis;

public class Main{
        public static string ToIsoDateTimeStr(this DateTime date)
        {
            return date.ToString("yyyy-MM-ddTHH:mm:sszzz");
        }
}

Related Tutorials