To Iso Date Time Str Without Time Zone - CSharp System

CSharp examples for System:DateTime Timezone

Description

To Iso Date Time Str Without Time Zone

Demo Code


using System.Runtime.CompilerServices;
using System;/*w w w .  jav a2 s.  c o m*/
using System.Diagnostics.CodeAnalysis;

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

Related Tutorials