I want to remove separater from Date
System.DateTime.Now.ToShortDateString()
returns mm/dd/yyyy as 4/13/2012. then how can i remove '/' from the string.
I am converting date string to int32 as:
Convert.ToInt32(System.DateTime.Now.ToShortDateString().Trim(new char[]{'/'}));
but trim does not trim the character between the string.
Any another better suggestion to do this will be appriciated.
Thanks in advance.
try this:
Edit: As per @Tim comment
Another way is use the DateTime.ToString() Patterns