Click here to Skip to main content
15,891,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to delete the comma special character between a date


example date={15-12-2015 11:05:05 AM}
i want like date=15122015110505AM
Posted

1 solution

Hello ,
As per your requirement try this below code
DateTime date= DateTime.Now;		
string format = "ddMMyyyhhmmsstt";		
Console.WriteLine(date.ToString(format));  

and O/P will be
15122015063146AM
 
Share this answer
 
Comments
Suvendu Shekhar Giri 15-Dec-15 1:41am    
5ed !
Animesh Datta 15-Dec-15 1:42am    
Thank You

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