才鸟问题
If Hour(TimeOfDay) > 12 Then
temptime = VB.Left(CStr(TimeOfDay), 5)
Else
temptime = VB.Left(CStr(TimeOfDay), 4)
End If
这里面的VB。LEFT里面的参数是什么意思啊结实下,谢谢
问题点数:30、回复次数:4Top
1 楼Macosx(结贴)回复于 2006-03-11 17:46:04 得分 5
Returns a string containing a specified number of characters from the left side of a string.
Public Shared Function Left( _
ByVal str As String, _
ByVal Length As Integer _
) As String
Parameters
str
Required. String expression from which the leftmost characters are returned.
Length
Required. Integer expression. Numeric expression indicating how many characters to return. If 0, a zero-length string ("") is returned. If greater than or equal to the number of characters in str, the entire string is returned.
Top
2 楼shanhun(闪魂)回复于 2006-03-11 19:04:27 得分 0
什么啊,哈哈,不懂,Top
3 楼crayfish823(正在学VB.net)回复于 2006-03-11 19:30:12 得分 25
Left 函数
返回一个字符串,其中包含从某个字符串左端开始的指定数量的字符。
Public Shared Function Left( _
ByVal Str As String, _
ByVal Length As Integer _
) As String
参数
Str ------也就是 CStr(TimeOfDay);CStr的作用是把timeofday转换为字符串类型
必选项。String 表达式,从该表达式返回最左端的字符。
Length --------就是 5
必选项。Integer 表达式。指示要返回的字符数的数值表达式。如果为 0,则返回零长度字符串 ("")。如果大于或等于 Str 的字符数,则返回整个字符串。
Top
4 楼shanhun(闪魂)回复于 2006-03-11 22:24:38 得分 0
谢谢哦
Top




