TagLib.IFD.IFDStructure.GetDateTimeValue C# (CSharp) Method

GetDateTimeValue() public method

Returns a System.Nullable containing the System.DateTime stored in the entry defined by entry_tag. The entry must be of type Entries.StringIFDEntry and contain an datestring according to the Exif specification.
public GetDateTimeValue ( int directory, ushort entry_tag ) : DateTime?
directory int /// A with the number of the directory /// to search for the entry. ///
entry_tag ushort /// A with the tag of the entry ///
return DateTime?
		public DateTime? GetDateTimeValue (int directory, ushort entry_tag)
		{
			string date_string = GetStringValue (directory, entry_tag);
				
			try {
				DateTime date_time = DateTime.ParseExact (date_string,
						DATETIME_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
				
				return date_time;
			} catch {}
				
			return null;
		}