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.
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
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. |
|||
|
|||
4 comments :
..
hiii sir.... how to add the current date in textbox using ajax
hiii sir.... how to add the current date in textbox using ajax
i want to show day in english. what can i do??
Note: Only a member of this blog may post a comment.