Step by step migration of ASP.NET Core 2.2 to 3.1

In order to upgrade/migrate core version to 3.1 following steps to be perform. Download and install Visual Studio 2019 version 16.4 or higher. Download and install .NET Core 3.1 Upgrade the projects of solution to .NET Core 3.1 , because ASP.NET Core 3.1 requires it. Update existing Nuget packages to a version compatible with ASP.NET Core 3.1 in each project Use IHost interface from a IHostBuilder instead of building and running a IWebHost from a IWebHostBuilder in Program.cs public static IHostBuilder CreateWebHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseKestrel() .UseSerilog() .UseStartup<Startup>(); }) Change AddMvc method has been replaced by AddControllers in Startup.cs of each projects. In Startup.cs, UseMvc method to b

Devexpress Datebox date formatting in angular 6 with example

The Devexpress DateBox in Angular is a widget that displays the date and time in one of DevExtreme predefined formats or a format defined in an
external localization library, or a type in the required date/time value. In this article,
the i will provide you different date-format which we can set on DateBox to show date and time to user.

Following is the code snippet to add Datebox in your Angular form if the you want to capture only date

         displayFormat="EEEE, MMM dd" type="date" >  

Following is the custom formats we can set and depending upon its converted values will be shown.

 "dd-MM-yyyy" => 28-10-2018  
 "EEEE, MMM dd" => Sunday, Oct 28  
 "dd MMM yyyy EEEE" => 28 Oct 2018 Sunday  
 "dd-MM-yyyy EEEE" => 28-10-2018 Sunday  

alternatively you can change the format as way you want

Following is the code snippet to add Datebox in your Angular form if the you want to capture date and time. we just need to change "type" attribute to "datetime".

         displayFormat="EEEE, MMM dd hh:mm:ss a" type="datetime" >  

Following is the custom formats for date & time we can set and depending upon formats its converted values will be shown to user.

 "EEEE, MMM dd hh:mm:ss a" => Sunday, Oct 28 12:20:31 PM  
 "dd-MM-yyyy hh:mm:ss a" => 28-10-2018 12:20:31 PM  

if you want to show the format in 24 hours you can use following strings

 "EEEE, MMM dd HH:mm:ss" => Sunday, Oct 28 16:24:10  
 "dd-MM-yyyy HH:mm:ss" => 28-10-2018 16:24:10  

I have given enough example of all possible format strings which you can change according to your need if you want.

Please provide me feedback if you want i am eagerly waiting for your comments.

Hope this will solve your query.


Popular posts from this blog

Restore the lost focus of Auto post back controls in update Panel control

Add Comma automatically while entering amounts in textbox using Javascript

clone a generic list in C# using extension method