from DateTime to Int
-
Does anyone know how to convert a datetime format(dd/mm/yyyy) to a string (i.e removing the "/") Thx
-
You mean
ToLongTimeString()
method ? i.eDateTime.Now.ToLongTimeString()
which return a string Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - BabujiI think he wants to remove the "/" also. so do this...
DateTime.Now.ToLongTimeString().Replace("/", "")
-
I think he wants to remove the "/" also. so do this...
DateTime.Now.ToLongTimeString().Replace("/", "")
ToLongTimeString()
returns Time not date and moreover it is dependent on local settings. Instead, use format string as follows: -DateTime.Now.ToString("dd MM yyyy");
//Start of joke Never comment ur code. If it was hard to write, it should be hard to understand !!! //End of joke -
Does anyone know how to convert a datetime format(dd/mm/yyyy) to a string (i.e removing the "/") Thx
Use format string as follows: -
DateTime.Now.ToString("dd MM yyyy");
//Start of joke Never comment ur code. If it was hard to write, it should be hard to understand !!! //End of joke -
Use format string as follows: -
DateTime.Now.ToString("dd MM yyyy");
//Start of joke Never comment ur code. If it was hard to write, it should be hard to understand !!! //End of joke -
just out of curiocity... why would u need this?? There is nothing new under the sun,
But there are lots of old things we don't know.
- Ambrose Bierce