Dim theImage As Image = Image.FromFile("c:\aaa\abc.jpg")
Dim propItems() As System.Drawing.Imaging.PropertyItem = theImage.PropertyItems
If array.Indexof(theImage.PropertyIdList,"36867") <0 Then
MessageBox.show("此图片没日期属性")
Return Nothing
End If
Dim propItem As System.Drawing.Imaging.PropertyItem = theImage.GetPropertyItem(36867)
Dim propItemValue() As Byte = propItem.Value
Dim dateTimeStr As String = System.Text.Encoding.ASCII.GetString(propItemValue).Trim(chr(0))
Dim dt As Date = DateTime.ParseExact(dateTimeStr, "yyyy:MM:dd HH:mm:ss",System.Globalization.CultureInfo.InvariantCulture)
theImage.Dispose
MessageBox.show(dt)