今度は、HHMMDDを取得します。
引数も同様に、1以上の場合は”HH:MM:SS”を、0の場合は”HHMMSS”です。


Private Function GET_HHMMSS(ByVal STR_Flag)
  Dim STR_Temp
  Dim STR_HHMMSS

  If Not IsNumeric(STR_Flag) Then Exit Function End If

  STR_Temp = Hour(Now())
  If Len(Hour(Now())) = 1 Then STR_Temp = "0" & Hour(Now())
  If STR_Flag >= 1 Then STR_Temp = STR_Temp & ":" End If
  STR_HHMMSS = STR_Temp

  STR_Temp = Minute(Now())
  If Len(Minute(Now())) = 1 Then STR_Temp = "0" & Minute(Now())
  If STR_Flag >= 1 Then STR_Temp = STR_Temp & ":" End If
  STR_HHMMSS = STR_HHMMSS & STR_Temp

  STR_Temp = Second(Now())
  If Len(Second(Now())) = 1 Then STR_Temp = "0" & Second(Now())
  STR_HHMMSS = STR_HHMMSS & STR_Temp

  GET_HHMMSS = STR_HHMMSS
End Function

Scriptのダウンロードは こちら です。

3 Comments

  1. http://51.68.186.130/ says:

    … [Trackback]

    […] Read More Info here on that Topic: dragon-ark.com/archives/107 […]

  2. Energy Rates says:

    … [Trackback]

    […] Info on that Topic: dragon-ark.com/archives/107 […]

  3. pic 5678 says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/107 […]

Leave a Reply