Error: The best overloaded method match for string.ToString has some invalid arguments using C# in ASP.Net

Last Reply 11 months ago By AnandM

Posted 11 months ago

Dear programer,

I have a column named for Deposit_date and isert date from form side is as 01/01/2001

 

But i want to chnage this date as 01-Jan-2001

here is my code that is not working - 

SELECT * FROM Tabel replace(CONVERT(VARCHAR(15), Deposit_date, 106) AS [DD-MMM-YYYY])

 

Posted 11 months ago

HI AnkitPal,

Refer below code

string b = "01/01/2001"; //Your value must be in sequence of month/date/year.
string a = Convert.ToDateTime(b).ToString("dd-MMM-yyyy");

 

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