Yesterday.aspx
----------------
<script language="vb" runat="server">
Sub Page_Load()
Dim NextTime As Date = Now
NextTime = NextTime.AddDays(-1)
time.text = "Yesterday was " & NextTime
End Sub
</script>
<html>
<head><title>Yesterday</title></head>
<body>
<asp:label id="time" runat="server" /><br/>
</body>
</html>
-------------
Dim ts As New TimeSpan(1, 0, 0, 0)
'Timespan(Days,Hours,Minutes,Seconds)
Dim t As Date = Date.Today.Subtract(ts)
time.text="Yesterday was " & t.ToShortDateString
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.