我想通过让用户里Calendar选择一个日子,然后返回它是全年的第几个星期。应该怎么操作呢?
解决方案 »
- 自动调转页面问题
- 请帮忙看一下下面这段代码有什么错误,谢谢
- 未将对象引用设置到对象的实例
- HyperLink1的问题!!!!!!!!!!!!!!!!!!!!!
- 急!!!System.Xml.XmlDocument问题
- 网页中的控件被遮住,如何解决?
- 如果根据<asp:BoundField DataField="bAduting" HeaderText="状态" /> 的值来决定 另一列中的内容 是否显示
- 在asp.net中调用office并允许将修改结果保存到数据库。我有2800分!!
- ASP.NET怎么引用自定义的控件啊.?
- IISW问题,请微软的【百变金刚】同志看过来,感激涕零!!!
- FormsAuthenticationTicket里的cookie时效和Context.Cache.Insert里的cookie时效有什么区别阿
- 怎么让鼠标指针放在下拉框选项的时候会出现提示?
Imports System
Imports System.GlobalizationPublic Class SamplesCalendar Public Shared Sub Main()
' Gets the Calendar instance associated with a CultureInfo.
Dim myCI As New CultureInfo("en-US")
Dim myCal As Calendar = myCI.Calendar
' Gets the DTFI properties required by GetWeekOfYear.
Dim myCWR As CalendarWeekRule = myCI.DateTimeFormat.CalendarWeekRule
Dim myFirstDOW As DayOfWeek = myCI.DateTimeFormat.FirstDayOfWeek
' Displays the number of the current week relative to the beginning of the year.
Console.WriteLine("The CalendarWeekRule used for the en-US culture is {0}.", myCWR)
Console.WriteLine("The FirstDayOfWeek used for the en-US culture is {0}.", myFirstDOW)
Console.WriteLine("Therefore, the current week is Week {0} of the current year.", myCal.GetWeekOfYear(DateTime.Now, myCWR, myFirstDOW))
' Displays the total number of weeks in the current year.
Dim LastDay = New System.DateTime(DateTime.Now.Year, 12, 31)
Console.WriteLine("There are {0} weeks in the current year ({1}).", myCal.GetWeekOfYear(LastDay, myCWR, myFirstDOW), LastDay.Year)
End Sub 'Main
End Class 'SamplesCalendar
dim weeknum,data
weeknum = weekDay(now(),1)
select case weeknum
case "1"
data="星期天"
case "2"
data="星期一"
case "3"
data="星期二"
case "4"
data="星期三"
case "5"
data="星期四"
case "6"
data="星期五"
case "7"
data="星期六"
case else
data="错误的时间"
end select
response.write data
%>