The field
txtInvoiceEndDate.Text
is not a Type. You cannot convert data into an instance or value directly.
You can cast to a type. Thus using
Convert.ToString()
will work.
string invMonth = Convert.ToString(DateTime.Now.GetDateTimeFormats()[130].Substring(0, 3));