开发者

Dateformat for ajax calendar extender to create (e.g.) 1980/01/01?

开发者 https://www.devze.com 2023-01-24 08:03 出处:网络
I have tried yyyy/MM/dd but this returns 1980/1/1, which will fail the check against cult开发者_如何学Pythonureinfo format in .NETtry with this it adds the 0 so you will have 1980/01/01

I have tried yyyy/MM/dd but this returns 1980/1/1, which will fail the check against cult开发者_如何学Pythonureinfo format in .NET


try with this it adds the 0 so you will have 1980/01/01

 DateTime dt = new DateTime(1980, 01, 01);
 string result = String.Format("{0:yyyy/MM/dd}", dt);

hope it helps

0

精彩评论

暂无评论...
验证码 换一张
取 消