I have the following object with hard coded Month and Year
objStreamWriter.WriteLine("March 2018""")
I declared a variable for currentdatetime as follows.
Dim dtmCurrentDateTime As Date = Now
How do I change this hard coded March 2018 and instead use variable dtmCurrentDateTime.ToString("yyyy-MM-ddTHH:mm:ss") but without showing T in the time?
I want result to be like this 2018-04-06 09:53:48.
I do not want to display military time. So 01 PM should not be 13 00.
objStreamWriter.WriteLine("March 2018""")
What I have tried:
I have tried the following which is hard coding the Month and year.
objStreamWriter.WriteLine("March 2018""")
I also tried this but it's not working.
I am getting an error Comma,')', or a valid expression continuation expected.
objStreamWriter.WriteLine("" dtmCurrentDateTime.ToString("yyyy-MM-ddTHH: mm : ss")"")