How ASP.NET Core returns Json DateTime format
Editor to share with you how to return ASP.NET Core Json DateTime format, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
When ASP.NET Core returns Json format, how to customize its format if there is a DateTime type in the returned data? The configuration is as follows:
Services.AddMvc (). AddJsonOptions (opt = > {opt.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm";}); the above is all the content of the article "how ASP.NET Core returns Json DateTime format". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!