3
Answers

Convert Datetime? property value to string format

Prasant Jinaga

Prasant Jinaga

12y
7.4k
1
Hi,

I have a property in a class with datatype Datetime?
for ex:
int Datetime? test;

Now i want to convert this test to "mm/dd/yyyy" format

I tried with .Tostring("mm/dd/yyyy") its not working.
it says an error
No overload for method ''Tostring" takes 1 argument.

Do anyone faced this problem before???

Thanks,
Prasant
Answers (3)