I need to extract the date from the "Media Created" column (highlighted in green in my example below) using C #.
In my example, the columns "Media Created" and "Date" are accurate. However, there are several cases where they are not. The "Media Created" column contains the correct date the video was recorded.

Here is the function I used to get it. Thanks to Aziz for pointing me in the right direction:
Shell shell = new ShellClass(); Folder folder = shell.NameSpace(_File.DirectoryName); FolderItem file = folder.ParseName(_File.Name); // These are the characters that are not allowing me to parse into a DateTime char[] charactersToRemove = new char[] { (char)8206, (char)8207 }; // Getting the "Media Created" label (don't really need this, but what the heck) string name = folder.GetDetailsOf(null, 191); // Getting the "Media Created" value as a string string value = folder.GetDetailsOf(file, 191).Trim(); // Removing the suspect characters foreach (char c in charactersToRemove) value = value.Replace((c).ToString(), "").Trim(); // If the value string is empty, return DateTime.MinValue, otherwise return the "Media Created" date return value == string.Empty ? DateTime.MinValue : DateTime.Parse(value);
Jason thuli
source share