Click here to Skip to main content
15,893,994 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
dear friends
how to replace specail charecters (/,\,:,<,>) in datetime format in vb.net

thanks
Posted
Comments
Maciej Los 14-May-15 1:43am    
Replace with what?

You can use RegEx or you can use String.Replace() to do it. If you are unfamiliar with either one then you can google for examples.

But normally you will not want to strip characters from dates so you may need to rethink your strategy.
 
Share this answer
 
First of all: date is date and nothing else!

Second of all, if you want to display date in custom format, please have a look here: Custom Date and Time Format Strings[^]

C#
Dim thisDate1 As Date = #6/10/2011#
Console.WriteLine("Date: {0} is displayed as: {1}", thisDate1,thisDate1.ToString("ddMMMyyyy") )


Result:
Date: 2011-06-10 00:00:00 is displayed as: 10Jun2011
 
Share this answer
 

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