Right Function

αžαŸ’αžšαž‘αž”αŸ‹β€‹αžαž½β€‹αž’αž€αŸ’αžŸαžš "n" αžŠαŸ‚αž›β€‹αž“αŸ…β€‹αžŸαŸ’αžαžΆαŸ†β€‹αž”αŸ†αž•αž»αžβ€‹αž“αŸƒβ€‹αž€αž“αŸ’αžŸαŸ„αž˜β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αž˜αž½αž™Β αŸ”

αž˜αžΎαž›β€‹αž•αž„β€‹αžŠαŸ‚αžš αŸ– αž’αž“αž»αž‚αž˜αž“αŸ LeftΒ αŸ”

αžœαžΆαž€αŸ’αž™β€‹αžŸαž˜αŸ’αž–αž“αŸ’αž’ αŸ–


Right (Text As String, n As Long)

αžαž˜αŸ’αž›αŸƒβ€‹αžαŸ’αžšαž‘αž”αŸ‹ αŸ–

αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžš

αž”αŸ‰αžΆαžšαŸ‰αžΆαž˜αŸ‰αŸ‚αžαŸ’αžš αŸ–

Text αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŽαžΆβ€‹αž˜αž½αž™ αžŠαŸ‚αž›β€‹αž’αŸ’αž“αž€β€‹αž…αž„αŸ‹β€‹αžαŸ’αžšαž‘αž”αŸ‹β€‹αžαž½β€‹αž’αž€αŸ’αžŸαžšβ€‹αž“αŸ…β€‹αžŸαŸ’αžαžΆαŸ†β€‹αž”αŸ†αž•αž»αžΒ αŸ”

αž–αŸαž›β€‹αž€αŸ†αž–αž»αž„β€‹β€‹αžšαž€αŸ’αžŸαžΆβ€‹αž‘αž»αž€β€‹ αž¬β€‹αž€αŸ†αž–αž»αž„β€‹αž•αŸ’αž‰αžΎ

αž§αž‘αžΆαž αžšαžŽαŸβ€‹αžŠαžΌαž…β€‹αžαžΆαž„β€‹αž€αŸ’αžšαŸ„αž˜ αž”αž˜αŸ’αž›αŸ‚αž„β€‹αž€αžΆαž›β€‹αž”αžšαž·αž…αŸ’αž†αŸαž‘β€‹αž€αŸ’αž“αž»αž„β€‹αž‘αŸ’αžšαž„αŸ‹αž‘αŸ’αžšαžΆαž™ YYYY-MM-DD αž‘αŸ…β€‹αž‡αžΆβ€‹αž‘αŸ’αžšαž„αŸ‹αž‘αŸ’αžšαžΆαž™β€‹αž€αžΆαž›β€‹αž”αžšαž·αž…αŸ’αž†αŸαž‘β€‹αžšαž”αžŸαŸ‹β€‹αžŸαž αžšαžŠαŸ’αž‹β€‹αž’αžΆαž˜αŸαžšαž·αž€ (MM/DD/YYYY)Β αŸ”

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!