World Of Webmaster
Đăng nhập / Đăng ký
Account
Free for web
Check pagerank
Input check pager (Not http://)

Ext: blog.kai.vn
Check google pagerank
View HTML source
FUNCTION LIBRARY
HTML Tags Library
PHP Functions Library ASP Functions Library
ASP Functions WeekNumber
Chức năng: Số tuần lễ trong một ngày được cho
Ngôn ngữ: asp - Nhóm: date_time
CÚ PHÁP
int = WeekNumber(dateValue) 

Trả về số tuần lễ trong một đối số kiểu ngày (Date)

VÍ DỤ
<%
Response.Write  WeekNumber("10/05/1999") & "<br />"
'--- returns: 19
%>
ASP Code
<%
Private Function WeekNumber(dteValue)
   '--- Monday is set as first day of week
   Dim lngDate
   Dim intWeek
   '--- If january 1. is later then thursday, january 1. is not in week 1
   If Not Weekday("01/01/" & Year(dteValue), vbMonday) > 4 Then
      intWeek = 1
   Else
      intWeek = 0
   End If
   '--- Sets long-value for january 1.
   lngDate = CLng(CDate("01/01/" & Year(dteValue)))
   '--- Finds the first monday of year
   lngDate = lngDate + (8 - Weekday("01/01/" & Year(dteValue), vbMonday))
   '--- Increases week by week until set date is passed
   While Not lngDate > CLng(CDate(dteValue))
      intWeek = intWeek + 1
      lngDate = lngDate + 7
   Wend
   '--- If the date set is not in week 1, this finds latest week previous year
   If intWeek = 0 Then
      intWeek = Week("31/12/" & Year(dteValue) - 1)
   End If
   WeekNumber = intWeek
End Function
%>

CheckDayLightSavings
GetDaysInMonth
GetFirstOfMonth
GetLastOfMonth
GetStandardChangeDate
IsLeapYear
Military2TwelveHour
MilitaryTime
NthPreviousWeekdayDate
SecondsToTime
Library ›› HTML Tag | PHP Function | ASP Function
Page : 873788
Online :
Visited : 396897
 
Liên h | Thêm vào Favorite | Gửi link qua e-mail | Thông tin website
Copright © 2009 KAI Blog
Code by BOINGOnline. Contact email : contact@kai.vn
Theme: default | classic |