1
I’m trying to format a date:
string s = linha.data.ToString("yyyyMMdd");
but I’m getting an error in ToString()
No Overload for Method 'Tostring' takes 1 argument
Any hint?
EDITED
In my date field, when I hover over it, it appears like this: DateTime? bpiUltrassom.data {get; set;}
I don’t know why this interrogation comes up after DateTime
But I don’t want to use the strokes, I want the way it is in the code: anomesdia
– Italo Rodrigo
DateTime?
is the guyDateTime
that allowsNull
. See: https://docs.microsoft.com/pt-br/dotnet/csharp/programming-guide/nullable-types/using-nullable-types– Fernando