打印本文 打印本文  关闭窗口 关闭窗口
ASP中的函数应用方法及应用举例(二)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005/9/10 12:53:58
trTest)
%>
  RESULT: THIS IS A TEST!!
-------------------------------------
  
42. VarType()
  FUNCTION: Returns the subtype of a variable
  SYNTAX: VarType(varName)
  ARGUMENTS: varName is the required variable name
  EXAMPLE: <%
i = 3
response.write varType(i)
%>
  RESULT: 2
(2 indicates Integer. Refers to ASP Constants)
-------------------------------------
  
43. WeekDay()
  FUNCTION: Returns a whole number representing the day of the week.
  SYNTAX: WeekDay(date [, firstdayofweek])
  ARGUMENTS: date is any valid date expression; firstdayofweek is an optional date constant to assign the
first day of week.
  EXAMPLE: <%
d = #8/4/99#
response.write Weekday(d)
%>
  RESULT: 4
(4 indicates the fourth of the week, which is Wednesday)
-------------------------------------
  
44. WeekDayName()
  FUNCTION: Returns the specified day of the week.
  SYNTAX: WeekDayName(weekday [, Abb [, firstdayofweek]])
  ARGUMENTS: weekday is the numeric representation for the day of the week; Abb is an optional boolean
value (if set to true, the weekday name will be abbreviated; if set to false, the full weekday name is
displayed); and firstdayofweek is an optional date constant to assign the first day of week.
  EXAMPLE: <%
d = #8/4/99#
response.write WeekdayName(Weekday(d))
%>
  RESULT: Wednesday
-------------------------------------
  
45. Year()
  FUNCTION: Returns the current year.
  SYNTAX: Year(date)
  ARGUMENTS: date is any valid date expression.
  EXAMPLE: <%=Year(#8/4/99#)%>
  

上一页  [1] [2] 



打印本文 打印本文  关闭窗口 关闭窗口