I have a little problem with time format
I would like to get an output of the form YYYY-MM-DD
given the datetime data input as 19901209 which is 1990-12-09
.
I would also like to know if there is any way to get the data in other formats as well, for example, DD-MM-YYYY
or MM-DD-YYYY
given the data formated in the form as specified i.e 19901209.
Thank you so much in advance.
DateTime.ParseExact("19901209", "yyyyMMdd",null).ToString("yyyy-MM-dd")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With