Format Date - CSharp System

CSharp examples for System:DateTime Format

Description

Format Date

Demo Code


using System.Windows;
using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
using System;//from  w  ww. java  2  s.co m
using Asclepius.AppPages.Models;

public class Main{
        public static string FormatDate(DateTime date)
        {
            CultureInfo ci = new CultureInfo("en-GB");

            string format = "D";
            return date.ToString(format, ci);
        }
}

Related Tutorials