I am trying to rewrite a VB function in C #, but I am getting the following error:
Error 1 The non-invoking element "System.DateTime.Today" cannot be used as a method. C: \ Documents and Settings \ daultrd \ Local Settings \ Temp \ SSIS \ ST_ceaa126ff88343ccbfdc6dd27d8de1a7 \ ScriptMain.cs 56 67 ST_ceaa126ff88343ccbfdc6dd27d8de1a7
And offensive line:
strTomorrow = Convert.ToString(String.Format(DateTime.Today().AddDays(+1), "yyyyMMdd"));
How can i fix this? Thank you, guys; you are very fast! And you all said the same thing. So I removed the bracket, but now I get another error:
Error 1 The best overloaded method match for 'string.Format (System.IFormatProvider, string, params object [])' has some invalid arguments C: \ Documents and Settings \ daultrd \ Local Settings \ Temp \ SSIS \ 2e23c9f006d64c249adb3d3a2e597591 \ ScriptMain.cs 56 44 st_ceaa126ff88343ccbfdc6dd27d8de1a7
And here is this line of code:
strTomorrow = Convert.ToString(String.Format(DateTime.Today.AddDays(+1), "yyyyMMdd")); //Strings.Format(DateAndTime.Today().AddDays(+1), "yyyyMMdd"));
source share