c# - Remove part of String inside List<string> -
I have list
in which it will have an item like 2014 -11-03 23:58 58: 37.6750486_0003
and I was wondering how it could touch the following items from the list: 2014 -11-03
and .6750486_0003
, except for 23:58:37
.
Use the following to add the item to the list:
calltimelist.add (msg). .timestamp () as_creator_time (header.tz_offset ()) ToString ()).
Use this
console WrightLine (entry time. Shuttle (11, 8));
works fine because it will always start at 11 @ and only 8 characters
You can do something like
var newList = callTimeList.Select (c => c.Substring (11,8)). ToList ();
But I think your call timeline must be stored as a list of dates to make better calls, and then it has to be wired as necessary. My initial though was to convert the string to a date and then it had to be formatted
var newList = callTimeList.Select (c =>; string.format ("{0: HH: mm : Ss} ", c) ToList () .;
But I'm not familiar with the _0003 stuff, but this date is not reciprocated by time. Purse
Comments
Post a Comment