Save date in ddMMyyyy format in MySQL Database in ASP.Net C#

Last Reply on Feb 15, 2014 12:50 AM By Azim

Posted on Feb 15, 2014 12:10 AM

i need to get some values from Mysql Db. i have passed some values to mysql and get the result.how to pass date format in  MySql from Asp.net C# code.

Posted on Feb 15, 2014 12:50 AM

You need create Varchar(20) Datatype for this

protected void Save(object sender, EventArgs e)
    {
        DateTime dt = new DateTime();
        dt = Convert.ToDateTime(this.txtDate.Text);
        string date = dt.ToString("yyyy/MM/dd");        
    }

Store the date in Varchar(20) Datatype column.

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html