string represents date, and reformat it

前端 未结 6 853
情书的邮戳
情书的邮戳 2020-12-21 17:45

The following case: There is a string that has this format \"2012-02-25 07:53:04\"

But in the end, i rather want to end up with this format \"25-02-2012 07:53:04\"

6条回答
  •  清酒与你
    2020-12-21 17:56

    Parse as DateTime then reformat it. Be careful: use always an IFormatProvider!

提交回复
热议问题