Mid Function, Mid Statement

Returns the specified portion of a string expression (Mid function), or replaces the portion of a string expression with another string (Mid statement).

བརྡ་འཕྲོད་


Mid (Text As String, Start As Integer [, Length As Integer]) ཡང་ན་་ Mid (Text As String, Start As Integer , Length As Integer, Text As String)

ཕྱིར་ལོག་ཐང་

ཡིག་རྟགས་ཕྲེང་བ་ ( རྟེན་གྲངས་ཁོ་ན་སྤྱོད་)

ཁུགས་གྲངས་

Text བཟོ་བཟོས་དགོས་རྒྱུའི་ཡིག་རྟགས་ཕྲེང་བའི་མཚོན་ཚུལ་གང་རུང་།

Start གྲངས་མཚོན་ཚུལ་གྱིས་ཚབ་བརྗེའམ་ཕྱིར་ལོག་དགོས་རྒྱུའི་ཡིག་རྟགས་ཕྲེང་བའི་ཆ་ཤས་ཉིད་ཡིག་རྟགས་ཕྲིང་བའི་ནང་གི་འགོ་འཛུགས་གནས་མཚོན་ ཆོག་པའི་གྲངས་ཐང་ཆེ་ཤོས་ནི་ 65535

Length ཚབ་བརྗེའམ་ཕྱིར་ལོག་དགོས་རྒྱུའི་ཡིག་རྟགས་ཁ་གྲངས་ཀྱི་གྲངས་མཚོན་ཚུལ་དུ་ཕྱིར་ལོག ཆོག་པའི་གྲངས་ཐང་ཆེ་ཤོས་ནི་ 65535

གལ་སྲིད་ Mid རྟེན་གྲངས་ནང་གི་ Length ཁུགས་གྲངས་གཏན་འཁེལ་མེད་ན་ ཡིག་རྟགས་ཕྲེང་བའི་མཚོན་ཚུལ་ནང་གི་འགོ་ཚུགས་ནས་ཡིག་རྟགས་ཕྲེང་བའི་མཇུག་བསྡུ་པའི་ཡིག་རྟགས་སུ་ཕྱིར་ལོག་པ།

གལ་སྲིད་ Mid བརྗོད་པའི་ནང་གི་ Length ཁུགས་གྲངས་དེ་ཚབ་བརྗེའི་ཡི་གེའི་རིང་ཚད་ལས་ཆུང་བ་ཡོད་ན་ཡི་གེའི་རིང་ཚད་དེ་གཏན་འཁེལ་གྱི་རིང་ཚད་དུ་ཐུང་དུ་གཏོང་དགོས།

Text ཡིག་རྟགས་ཕྲེང་བའི་མཚོན་ཚུལ་གྱི་ཡིག་རྟགས་ཕྲེང་བའི་ཚབ་བརྗེ་སྤྱོད་བརྒྱུད།(Mid བརྗོད་པ།)

Error codes:

5 ནུས་མེད་ཀྱི་བརྒྱུད་རིམ་འཁོར་སྤྱོད་

དཔེ་གཞི་


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

Please support us!