title: How to get date for every image captured in folder using C#
body: <p>I'm doing a license plate recognition system. I have set up my camera to capture image every 10 seconds and stored it in a folder. May I know how to get or capture the date and time and show it in a label for every image captured in the folder. I'm using a C# to code and and also using my usb camera to capture the image</p>
  
  <pre><code>    public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private FilterInfoCollection CaptureDevices;
          private VideoCaptureDevice videoSource;
          private Int32 pictureCount = 0;
  
          private void Form1_Load(object sender, EventArgs e)
          {
              CaptureDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
              foreach (FilterInfo Device in CaptureDevices)
              {
                  cboDevice.Items.Add(Device.Name);
              }
              cboDevice.SelectedIndex = 0;
              videoSource = new VideoCaptureDevice();
  
              timer1.Tick += new EventHandler(this.timer1_Tick);
              timer1.Interval = (100) * (100);
              timer1.Enabled = true;
              timer1.Start();
  
              videoSource = new VideoCaptureDevice(CaptureDevices[cboDevice.SelectedIndex].MonikerString);
              videoSource.NewFrame += new NewFrameEventHandler(videoSource_NewFrame);
              videoSource.Start();
  
          }
  
          void videoSource_NewFrame(object sender, AForge.Video.NewFrameEventArgs eventArgs)
          {
              pictureBox1.Image = (Bitmap)eventArgs.Frame.Clone();
          }
  
          private void timer1_Tick(object sender, EventArgs e)
          {
              pictureBox1.Image.Save(pictureCount.ToString() + ".jpg", ImageFormat.Jpeg);
              pictureCount++;
          }
  
      }
  </code></pre>
  
  <p>I expect by the time it captures the image, it will automatically show on the label the date and time of the image captured.</p>