You cannot use
ToShortDateString()
&
ToLongTimeString()
to compose the path of your file ; these will insert characters as '/' and ':' in your path, which are prohibited.
Better construct the path yourself, using
string.Format()
method ; for example :
DateTime myDate = DateTime.Now;
string strDate = string.Format("{0}-{1}-{2}", myDate.Year, myDate.Month, myDate.Day);
string strTime = string.Format("{0}-{1}-{2}", myDate.Hour, myDate.Minute, myDate.Second);
Of course, you're free to use any separator you want, but it must not be a forbidden character for the filesystem you're trying to save to.
Hope this helps. Kind regards.