How to convert datetime to a string

private string getTimeStamp(string timeformatString)
{
	DateTime dt = DateTime.Now;
	return dt.ToString(timeformatString);
}

Example time format strings

yyyyMMddHHmm

For more information on format strings look at: Docs on DateTimeFormatInfo