Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

C# - Get (Find) Name of the Day From Date in Asp.Net

Aug 6, 2014
Introduction:

Here I will explain
how to find or get name of the day in a week in asp.net using c#, vb.net when user will input the date.
Description:
In previous articles I explained SQL Query to find first & last day of month, SQL Query to get month wise & year wise data, SQL Query exclude weekends to get data, SQL Server Get only month & year from date and many articles relating to asp.net, c#, vb.net, SQL server. Now I will explain how to find or get name of the day in a week in asp.net using c#, vb.net when user will input the date.

First create one new web application and open your Default.aspx code behind file and Write the following code in Page_Load() method

C# Code


using System;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DateTime dateValue = new DateTime(2014, 6, 12);
Response.Write(dateValue.ToString("ddd"));
}
}
VB.NET Code


Partial Class vbcode
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim dateValue As New DateTime(2014, 6, 12)
Response.Write(dateValue.ToString("ddd"))
End Sub
End Class
Once we run above code we will get output like as shown below

Output
                                                   
Try it yours and enjoy... :)

Arkadeep De
Facebook | LinkedIn | Twitter

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

4 comments :

Anonymous said...

..

anjali said...

hiii sir.... how to add the current date in textbox using ajax

anjali said...

hiii sir.... how to add the current date in textbox using ajax

Unknown said...

i want to show day in english. what can i do??

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.