Saving image with Date and Time

Posted by Meko on Stack Overflow See other posts from Stack Overflow or by Meko
Published on 2010-06-06T19:32:33Z Indexed on 2010/06/06 19:42 UTC
Read the original article Hit count: 346

Filed under:
|
|
|

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);

© Stack Overflow or respective owner

Related posts about c#

Related posts about beginner