[QUOTE]quote:
--------------------------------------------------------------------------------
Also is there a way of shortening the whole program using wsprintf?
--------------------------------------------------------------------------------

sscanf or CString::Format can shorten your code a great deal:
code:--------------------------------------------------------------------------------CString getLogFilename()
{
CTime time = CTime::GetCurrentTime();
CString filename;
output.Format("%i/%i/%i", time.GetYear(), time.GetMonth(), time.GetDay());

return filename;
}
QUOTE]

Even simpler to use CTime::Format.

Code:
CString getLogFilename()
{
	CTime time = CTime::GetCurrentTime();
	CString filename = time.Format("%Y/%m/%d"); 	
	return filename;
}