Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void searchByDate(Tag tag, String pic)
- {
- if (tag.ToString().Contains("Date/Time Original"))
- {
- var regex = new Regex(@"bd{4}:d{2}:d{2}b");
- Match m = regex.Match(tag.ToString());
- DateTime dateFound;
- DateTime.TryParseExact(m.ToString(), "yyyy:MM:dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateFound);
- Console.WriteLine(dateFound);
- if (checkEnd && dateFound != null) if (dateFound >= date && dateFound <= dateEnd) Console.WriteLine("Date found between"); //foundPictures.Add(pic);
- else if (dateFound != null) Console.WriteLine("single date found");//foundPictures.Add(pic);
- else Console.WriteLine("No dates found");
- }
- }
- 16.09.2017 00:00:00
- Date found between
- 16.09.2017 00:00:00
- Date found between
- 07.12.2016 00:00:00
- Date found between
- 16.09.2017 00:00:00
- 16.09.2017 00:00:00
- 07.12.2016 00:00:00
- 16.09.2017 00:00:00
- 16.09.2017 00:00:00
- 07.12.2016 00:00:00
Add Comment
Please, Sign In to add comment