Notice: Constant SAVEQUERIES already defined in /home/uwsc/domains/uwsc.jp/public_html/wp-config.php on line 125

Notice: 関数 wp_add_inline_script が誤って呼び出されました。<script> タグを wp_add_inline_script() に渡さないでください。 詳しくは WordPress のデバッグをご覧ください。 (このメッセージはバージョン 4.5.0 で追加されました) in /home/uwsc/domains/uwsc.jp/public_html/wp-includes/functions.php on line 5905

Notice: Undefined variable: post in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 147

Notice: Undefined variable: post in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 154

Notice: Trying to get property 'ID' of non-object in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 154
getSecond | UWSC辞典


Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 27

Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 31
getSecond関数

本ページには広告が含まれています。


Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 27

Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25

Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25

Notice: Undefined offset: 1 in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 47

Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25

Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25

Notice: Undefined offset: 1 in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 47

Notice: A non well formed numeric value encountered in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 24

Notice: A non well formed numeric value encountered in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 24

Notice: A non well formed numeric value encountered in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 24

Notice: A non well formed numeric value encountered in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 24

指定された日時の「秒」を0〜59の間の数値で返します。日付のみ指定された場合は「00」が返ります。

構文
  1. UString = getSecond( date )
引数
date 必須
(”YYYYMMDD” or “YYYY/MM/DD” or “YYYY-MM-DD” or “YYYYMMDDHHNNSS” or “YYYY/MM/DD HH:NN:SS”)
戻り値
指定した日時の「秒」

プログラム

UWSC
//////////////////////////////////////////////////
// 【引数】
//   date : (”YYYYMMDD” or “YYYY/MM/DD” or “YYYY-MM-DD” or “YYYYMMDDHHNNSS” or “YYYY/MM/DD HH:NN:SS”) 
// 【戻り値】
//   指定した日時の「秒」 
//////////////////////////////////////////////////
FUNCTION getSecond(date)
	GETTIME(0, date)
	RESULT = G_TIME_SS2
FEND

解説

  1. 2行目
    UWSC
    	GETTIME(0, date)
    dateに指定した日時を特殊変数に代入。
  2. 3行目
    UWSC
    	RESULT = G_TIME_SS2
    「秒」を戻り値として返す。

関連記事

Second関数 (自作関数)
シリアル値からを求めます。
GETTIME関数 (スクリプト関数)
日付、時間を取得します。
getHour関数 (自作関数)
指定された時間のを返します。
getMinute関数 (自作関数)
指定された時間のを返します。
now関数 (自作関数)
現在の日時のシリアル値を返します。
getSerialTime関数 (自作関数)
UWSC時間からシリアル値を取得します。
getUNIXTime関数 (自作関数)
引数に指定した日時のUNIX時間を取得します。
uwscToSerial関数 (自作関数)
UWSC時間シリアル値に変換します。
uwscToUNIX関数 (自作関数)
UWSC時間UNIX時間に変換します。
serialToUNIX関数 (自作関数)
シリアル値UNIX時間に変換します。