
はじめに
VBScriptにはjavaでいうSimpleDateFormatみたいな便利なものがないみたいなので日付フォーマットする簡単な関数を書いてみました。
システムの海外対応等で日付のアメリカ式表記とかイギリス式表記にする必要もあると思うので難しく考えないで書ける簡単なもの。
プログラム
1 2 3 4 5 6 7 8 9 10 11 12 13 | Function DateFormat(ByVal strDate) Dim strYear Dim strMonth Dim strDay strYear = Year(strDate) strMonth = Right("0" & Month(strDate), 2) strDay = Right("0" & Day(strDate), 2) DateFormat = strMonth & "." & strDay & "." & strYear End Function |
月と日付は0パディングするようにしています。(2桁になるように0埋め)

![[Mac]任意のポートを使用しているプロセスを調べてKillする方法](https://www.yukiiworks.com/wp-content/uploads/2019/03/code1211IMGL1494_TP_V4-150x150.jpg)
![[Flutter]Navigatorで2つ前の画面に戻る方法](https://www.yukiiworks.com/wp-content/uploads/2020/08/flutter-150x150.png)
![[Swift]unrecognized selector sent to instance エラーについて](https://www.yukiiworks.com/wp-content/uploads/2019/04/swift-150x150.png)
![[Laravel]name属性の配列要素をoldで取得する方法](https://www.yukiiworks.com/wp-content/uploads/2019/05/laravel-150x150.png)
![[Docker]起動済みのMySQLデータを永続化させる](https://www.yukiiworks.com/wp-content/uploads/2019/08/docker-logo-2-150x150.png)
![[Python][Crypto]Module Not Found Error](https://www.yukiiworks.com/wp-content/uploads/2019/11/python-logo-150x150.png)

