Collabora Office 24.04 Help
Mid ํจ์๋ ๋ฌธ์์ด ์์ ์ง์ ๋ ์ผ๋ถ๋ฅผ ๊ตฌํ๋ฉฐ, Mid ๋ฌธ์ ๋ฌธ์์ด ์์ ์ง์ ๋ ์ผ๋ถ๋ฅผ ๋ค๋ฅธ ๋ฌธ์์ด๋ก ๋ฐ๊ฟ๋๋ค.
Mid (Text As String, Start As Integer [, Length As Integer]) or Mid (Text As String, Start As Integer , Length As Integer, Text As String)
String (only by Function)
Text: ์์ ํ ์์์ ๋ฌธ์์ด ์์ ๋๋ค.
Start: Numeric expression that indicates the character position within the string where the string portion that you want to replace or to return begins. The minimum allowed value is 1. The maximum allowed value is 2,147,483,648.
Length: Numeric expression that returns the number of characters that you want to replace or return. The maximum allowed value is 2,147,483,648.
Mid ํจ์์ Length ๋งค๊ฐ ๋ณ์๋ฅผ ์๋ตํ ๊ฒฝ์ฐ ์์ ์์น์์ ๋ฌธ์์ด์ ๋๊น์ง ๋ฌธ์์ด ์์ ๋ชจ๋ ๋ฌธ์๊ฐ ๊ตฌํด์ง๋๋ค.
Mid ๋ฌธ์ Length ๋งค๊ฐ ๋ณ์๊ฐ ๋ฐ๊ฟ ํ ์คํธ์ ๊ธธ์ด๋ณด๋ค ์์ ๊ฒฝ์ฐ ํ ์คํธ๋ ์ง์ ํ ๊ธธ์ด๋ก ์ค์ด๋ญ๋๋ค.
Text: ๋ฌธ์์ด ์์ ๋ฐ๊ฟ ๋ฌธ์์ด์ ๋๋ค(Mid ๋ฌธ).
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