I am trying to save image captured from web cam with current time.Like
06.06.2010 22:29:52.jpg
But compiler does not allow time format 22:20:30 . I searched but I could not find how to write time like 22.29.59 or how can solve this problem ?
String photoTime = DateTime.Now.ToString();
String SuspiciousPath = Path.Combine(PhotoPath+"//suspicious",photoTime+".jpg");
FirstPersonTestImage.Save(SuspiciousPath);
You can use
DateTime.ToString("MM.dd.yyyy HH.mm.ss");See full documentation in MSDN.
I recommend
DateTime.ToString("yyyy_MM_dd.HH_mm_ss");so you can sort by filename and it sorts by time.