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

Last Reply one year ago By AnandM

Posted one year 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])


Results 1 - 5 of 7 12
Posted one year ago

Hi AnkitPal,

Can you please explain in more detail exactly what you are trying to achieve?

Posted one year ago

i have a column that name is RecordDate and datatype is DATE

when i am insert my record through webform than date is inserted in RecordDate column as below- 








But I want to do that when i will be insert date through webform than date is insert as belwo form







Posted one year ago

Hi AnkitPal,

if your column RecordDate is having the datatype of DATE then you cant store the date with mentioned format "1-Jan-2001" as it is not supported by the SQL so you can do one thing change the column datatype to VARCHAR and while saving the date convert it into "YourValue".ToString("dd-MMM-yyyy") which will save the date in the "1-Jan-2001" format.

Posted one year ago

see below error -date error

Posted one year ago

Hi AnkitPal,

can you let me know the value of txtmaturitydate.Text.

I agree, here is the link: