IBM Lotus Symphony
|
返回字符串表达式中您所指定的最左边的数字。
Left (Text As String, n As Long)
字符串
Text:要返回最左边字符的任何字符串表达式。
n:指定要返回的字符数目的数字表达式。如果 n = 0,就会返回一个零长度字符串。最大允许值为 65535。
错误代码
Sub ExampleUSDate
Dim sInput As String
Dim sUS_date As String
sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'")
sUS_date = Mid(sInput, 6, 2)
sUS_date = sUS_date & "/"
sUS_date = sUS_date & Right(sInput, 2)
sUS_date = sUS_date & "/"
sUS_date = sUS_date & Left(sInput, 4)
MsgBox sUS_date
End Sub