To Iso Date Str - CSharp System

CSharp examples for System:DateTime Format

Description

To Iso Date Str

Demo Code


using System.Runtime.CompilerServices;
using System;/*  www .jav  a 2 s  . c o  m*/
using System.Diagnostics.CodeAnalysis;

public class Main{
        public static string ToIsoDateStr(this DateTime date)
        {
            return date.ToString("yyyy-MM-dd");
        }
}

Related Tutorials