Date To String with format MMddyyyy - CSharp System

CSharp examples for System:DateTime Format

Description

Date To String with format MMddyyyy

Demo Code


using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*w w  w .j  a  v  a 2 s. co  m*/

public class Main{
        public static string DateToDB(string date)
        {
            DateTime dt = Convert.ToDateTime(date);
            return dt.ToString("MMddyyyy");
        }
}

Related Tutorials