Created
October 19, 2023 07:16
-
-
Save kinuasa/4b53065c43248eae041bedc53094dd18 to your computer and use it in GitHub Desktop.
和暦を西暦に変換するPower Automate for desktopフロー(全角対応)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ | |
和暦を西暦に変換するフロー(全角対応) | |
Power Automate for desktop バージョン 2.37.00181.23279 で動作確認 | |
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#/ | |
SET NewVar TO $'''令和5年10月19日 01:23:45''' | |
/# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ | |
全角文字と半角文字の対応表を用意してループで置換 | |
※必要に応じて文字は追加 | |
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#/ | |
SET StringTable TO { ^['FullWidth', 'HalfWidth'], ['0', 0], ['1', 1], ['2', 2], ['3', 3], ['4', 4], ['5', 5], ['6', 6], ['7', 7], ['8', 8], ['9', 9], [' ', ' '], ['/', '/'], [':', ':'], ['.', '.'] } | |
LOOP LoopIndex FROM 0 TO StringTable.RowsCount - 1 STEP 1 | |
Text.Replace Text: NewVar TextToFind: StringTable[LoopIndex]['FullWidth'] IsRegEx: False IgnoreCase: False ReplaceWith: StringTable[LoopIndex]['HalfWidth'] ActivateEscapeSequences: False Result=> NewVar | |
END | |
Text.ConvertTextToDateTime.ToDateTime Text: NewVar DateTime=> TextAsDateTime | |
Display.ShowMessageDialog.ShowMessage Message: TextAsDateTime Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment