using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GenClassLibrary
{
    public class DateTimeConvert
    {
        // Function for conversion of a Indian Rupees into words
        //   Parameter - accept a Currency
        //   Returns the number in words format
        //   You can use this function in Excel, VBA, VB6,.NET
        //====================================================


        //DateTime'
        public string ConvertDate(string dt)
        {
            string data = dt;
            string[] parts = data.Split('-');
            DateTime date2 = new DateTime(Convert.ToInt32(parts[2]), Convert.ToInt32(parts[1]), Convert.ToInt32(parts[0]));
            return string.Format("{0:MM-dd-yyyy}", date2);
        }
        //small DateTime'
        public System.DateTime ConvertDate3(string dt)
        {
            string data = dt;
            string[] parts = data.Split('-');
            DateTime date2 = new DateTime(Convert.ToInt32(parts[2]), Convert.ToInt32(parts[1]), Convert.ToInt32(parts[0]));
            return Convert.ToDateTime(string.Format("{0:MM-dd-yyyy}", date2));
        }
        public System.DateTime ConvertDate1(string dt)
        {
            string data = dt;
            string[] parts = data.Split('/');
            DateTime date2 = new DateTime(Convert.ToInt32(parts[2]), Convert.ToInt32(parts[1]), Convert.ToInt32(parts[0]));
            return Convert.ToDateTime(string.Format("{0:MM/dd/yyyy}", date2));
        }
        public System.DateTime ConvertDate2(string dt)
        {
            string data = dt;
            string[] parts = data.Split('-');
            DateTime date2 = new DateTime(Convert.ToInt32(parts[2]), Convert.ToInt32(parts[1]), Convert.ToInt32(parts[0]));
            return date2;
        }
    }
}
