How can I display Weekday? Newbie - HELP!!

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

Hi

I need some help!

I hope I'm at the right group.

I have downloaded "Visual Web Developer 2005 Express Edition"

I have just started my first Master Page.

I wanted to add a "current date" WITH "weekday" - like this;

Tuesday, 24 October 2006

to be displayed to users who visit the site.

But I cannot find out how to do it.

This is what I have used for the past few years (under.asp)
which worked fine.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<%=weekdayname(weekday(date()))& " " & FormatDateTime(Date,vbLongDate)%>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I can display the date and time using a textbox (code behind);

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
dateTimeLabel.Text = DateTime.Now.ToString
End Sub
End Class


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<form id="form1" runat="server">
<div>
<asp:TextBox ID="dateTimeLabel" runat="server"></asp:TextBox><br />
</div>
</form>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Any help would be really appreciated.

Thanks, Stephen
 
I wanted to add a "current date" WITH "weekday" - like this;

Tuesday, 24 October 2006

to be displayed to users who visit the site.

But I cannot find out how to do it.

dateTimeLabel.Text = DateTime.Now.ToString("dddd, dd MMMM yyyy");
 
Back
Top