當前日期取得兩周之內日期 And 當前日期為第幾週
根據當前日期取得兩周之內日期
Dim d As DateTime = DateTime.Now
Dim Strat As DateTime = d.AddDays(-CInt(d.DayOfWeek) - 7)
Dim Enddate As DateTime = d.AddDays(-CInt(d.DayOfWeek) + 6)
當週是第幾週
Dim TDate, Weeknothis As String
Dim Setdate As Date
TDate = Today 2007/12/26
Setdate = CDate(TDate)
Weeknothis = DatePart(DateInterval.WeekOfYear, Setdate)
SQL語法--從抓出群組後,ID最小號
select ID,baan_model,yearno,weekno
from Foreunner_Model_Group as T1
where ID = (select Min(ID) from Foreunner_Model_Group as T2
where T1.baan_model = T2.baan_model )
order by YEARNO,WEEKNO
沒有留言:
張貼留言