Is there a way to convert DateTime object by some pattern to string of following pattern.
"yyyy-MM-dd HH:mm:ss.fff"
/// yyyy - the year as in 2005
/// yy - the year as in 05, leading zero if necessary
/// MM - the month with two digits, leading zero if necessary
/// dd - the day of the month with two digits, leading zero if ncessary
/// HH - the hour of the day in 24 hours format, leading zero if necessary
/// mm - the minute of the hour with two digits, leading zero if necessary
/// ss - the second of the minute with two digits, leading zero if necessary
/// fff - the fraction of the second with three digits, leading zero if necessary
Thanks a lot for help.
Yes, this van be done with
String.Format("{0:yyyy-MM-dd HH:mm:ss:fff}", yourdatetime);
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