Vbscript-month-function

提供:Dev Guides
移動先:案内検索

VBScript Month関数

Month関数は、指定された日付の月を表す1〜12の数値を返します。

構文

Month(date)

<!DOCTYPE html>
<html>
   <body>
      <script language = "vbscript" type = "text/vbscript">
         document.write(Month("2013-06-30"))

      </script>
   </body>
</html>

lとして保存してInternet Explorerで実行すると、上記のスクリプトは次の結果を生成します-

6