Click here to Skip to main content
15,924,482 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have following code


string n = dateTimePicker1.Value.ToString("yyyy-MM-dd");



which give me following output--------------"2014-07-11"


now i want to remove double inverted commams from this string how could i do this....
Posted
Updated 11-Jul-14 0:56am
v2
Comments
johannesnestler 11-Jul-14 6:42am    
what are inverted commams? Anyway, better you Format the string in the way you want it in the first place (when you give the Format string)?
Thanks7872 11-Jul-14 6:51am    
I suspect this question was posted just after seeing result while debugging..:laugh:
ShobuGpta 11-Jul-14 6:53am    
u mean double quotes??
Member 10891595 11-Jul-14 6:58am    
yes
Member 10891595 11-Jul-14 7:07am    
what happen sir is there is any solution ;

1 solution

I'll put you out of your misery before you become the butt of too many jokes.

The double-quotes are not part of your string.

That's just the way it is being displayed in the Locals or Output windows, or when you hover over n in debug mode.

Stick the string into a Label or TextBox to prove my point - there will be no double-quotes
 
Share this answer
 
Comments
Thanks7872 11-Jul-14 7:08am    
:laugh:
CHill60 11-Jul-14 7:12am    
Bless them!
KaushalJB 11-Jul-14 7:13am    
no rains this year...don't laugh :D
Member 10891595 11-Jul-14 7:15am    
if this have no meaning of double quotes then how i use this string value in following query


dt = obj.GetDataTable("SELECT * from mobilesubscriberdata1 where m_date="+"'n'");


because i have an error when i using this above type pls suggest me for what type of modification required in above query.
[no name] 11-Jul-14 7:35am    
You will get an error because that is invalid SQL.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900