I am using DateTime.Now.ToString() in a windows service and it is giving me output like \"7/23/2010 12:35:07 PM \" I want to exclude the second part, displaying only up to m
You might want to do something like DateTime.Now.ToString("M/d/yyyy hh:mm");
DateTime.Now.ToString("M/d/yyyy hh:mm");
for more information look at Custom Date and Time Format Strings