C# Change format of the Day with Leading zero In DateTime - 10.06.18 | 22.11.19 - ErcanOPAK You can use both methods: DateTime.Now.Day.ToString("00"); DateTime.Now.ToString("dd"); Related posts:Pass model from Razor view to JavaScriptConverting a List to a comma separated string in C#How to get rows count in EntityFramework without loading contentsCreating Multiline textbox using Html.Helper function in Asp.Net MVC Post Views: 149