以前は、UTCタイムフォーマットから”YYYYMMDDHHMMSS”に変換するスクリプトでした。

今度は、逆です。YYYYMMDDやHHMMSSを取得するスクリプトの使用しています。

Option Explicit
  Dim STR_Computer
  Dim OBJ_SWbemServices
  Dim OBJ_TimeZone
  Dim COL_TimeZone
  Dim STR_Bias
  Dim DTMCurrentDate
  Dim DTMTargetDate
  Dim DTMMonth
  Dim DTMDay

  STR_Computer = "."
  Set OBJ_SWbemServices = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & STR_Computer & "\root\cimv2")
  Set COL_TimeZone = OBJ_SWbemServices.ExecQuery("SELECT * FROM Win32_TimeZone")

  For Each OBJ_TimeZone In COL_TimeZone

    STR_Bias = OBJ_TimeZone.Bias

  Next

  DTMTargetDate = Get_YYYYMMDD(0) & Get_HHMMSS(0)
  DTMTargetDate = DTMTargetDate & ".000000"
  DTMTargetDate = DTMTargetDate & CStr(STR_Bias)

  WScript.Echo DTMTargetDate
Private Function Get_YYYYMMDD(ByVal STR_Flag)
  Dim STR_Temp
  Dim STR_YYYYMMDD

  If Not IsNumeric(STR_Flag) Then Exit Function End If

  STR_Temp = Year(Now)
  If Len(STR_Temp) = 2 Then STR_Temp = "20" & STR_Temp End If
  If STR_Flag >= 1 Then STR_Temp = STR_Temp & "/" End If
  STR_YYYYMMDD = STR_Temp

  STR_Temp = Month(Now())
  If Len(STR_Temp) = 1 Then STR_Temp = "0" & STR_Temp End If
  If STR_Flag >= 1 Then STR_Temp = STR_Temp & "/" End If
  STR_YYYYMMDD = STR_YYYYMMDD & STR_Temp

  STR_Temp = Day(Now())
  If Len(STR_Temp) = 1 Then STR_Temp = "0" & STR_Temp End If
  STR_YYYYMMDD = STR_YYYYMMDD & STR_Temp

  GET_YYYYMMDD = STR_YYYYMMDD
End Function

 
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のダウンロードは こちら です。

45 Comments

  1. kurumsal sunucu yapılandırma says:

    … [Trackback]

    […] There you will find 50246 more Info to that Topic: dragon-ark.com/archives/80 […]

  2. 토토사이트,토토커뮤니티 says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/80 […]

  3. World Market URL says:

    … [Trackback]

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

  4. dark0de market says:

    … [Trackback]

    […] Read More to that Topic: dragon-ark.com/archives/80 […]

  5. online sleepaway euthanasia solution says:

    … [Trackback]

    […] Information on that Topic: dragon-ark.com/archives/80 […]

  6. Microsoft office 2016 clave says:

    … [Trackback]

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

  7. สล็อตเว็บตรง says:

    … [Trackback]

    […] Here you will find 83040 more Information to that Topic: dragon-ark.com/archives/80 […]

  8. relx says:

    … [Trackback]

    […] Info to that Topic: dragon-ark.com/archives/80 […]

  9. คาสิโนออนไลน์เว็บตรง says:

    … [Trackback]

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

  10. hemp seed oil uses says:

    … [Trackback]

    […] Info to that Topic: dragon-ark.com/archives/80 […]

  11. car dealership surveillance says:

    … [Trackback]

    […] Find More here on that Topic: dragon-ark.com/archives/80 […]

  12. Quality replica watchesknockoff Bulgari Imitations Watches702 replica watches says:

    … [Trackback]

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

  13. darkfox market url says:

    … [Trackback]

    […] Information on that Topic: dragon-ark.com/archives/80 […]

  14. kardinal stick says:

    … [Trackback]

    […] There you can find 81578 additional Information on that Topic: dragon-ark.com/archives/80 […]

  15. good track 1/2 shop says:

    … [Trackback]

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

  16. beer777 says:

    … [Trackback]

    […] Read More on to that Topic: dragon-ark.com/archives/80 […]

  17. departamentos la paz says:

    … [Trackback]

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

  18. สล็อตวอเลท ไม่มีขั้นต่ำ says:

    … [Trackback]

    […] Here you can find 17930 more Info on that Topic: dragon-ark.com/archives/80 […]

  19. 강남셔츠룸 says:

    … [Trackback]

    […] Read More to that Topic: dragon-ark.com/archives/80 […]

  20. buy fullz says:

    … [Trackback]

    […] Here you will find 97473 additional Info on that Topic: dragon-ark.com/archives/80 […]

  21. ทางเข้า ufabet มือถือ says:

    … [Trackback]

    […] Here you will find 82451 more Information on that Topic: dragon-ark.com/archives/80 […]

  22. https://www.jpost.com/promocontent/prima-weight-loss-reviews-uk-dont-spend-a-dime-till-you-read-this-708038 says:

    … [Trackback]

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

  23. bienes raices todos santos says:

    … [Trackback]

    […] Here you can find 22606 additional Info to that Topic: dragon-ark.com/archives/80 […]

  24. sbo says:

    … [Trackback]

    […] Read More Information here to that Topic: dragon-ark.com/archives/80 […]

  25. baixe o happymod atualizado para iphone 42 says:

    … [Trackback]

    […] Find More to that Topic: dragon-ark.com/archives/80 […]

  26. สินค้าแม่และเด็ก says:

    … [Trackback]

    […] Here you will find 33327 additional Info on that Topic: dragon-ark.com/archives/80 […]

  27. san jose real estate says:

    … [Trackback]

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

  28. EFT hacks says:

    … [Trackback]

    […] Here you will find 21258 additional Info to that Topic: dragon-ark.com/archives/80 […]

  29. Sale Bettwäsche Bassetti 135x200 says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/80 […]

  30. buy dmt online melbourne says:

    … [Trackback]

    […] Read More to that Topic: dragon-ark.com/archives/80 […]

  31. เว็บสล็อต says:

    … [Trackback]

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

  32. zushilato flavor says:

    … [Trackback]

    […] There you will find 60771 additional Info to that Topic: dragon-ark.com/archives/80 […]

  33. ytconvert says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/80 […]

  34. Where to buy magic mushrooms online in Australia says:

    … [Trackback]

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

  35. 홀덤 says:

    … [Trackback]

    […] Here you can find 46500 additional Info on that Topic: dragon-ark.com/archives/80 […]

  36. sbobet says:

    … [Trackback]

    […] Here you will find 30230 more Info on that Topic: dragon-ark.com/archives/80 […]

  37. สินเชื่อโฉนดที่ดิน says:

    … [Trackback]

    […] Find More Information here to that Topic: dragon-ark.com/archives/80 […]

  38. other says:

    … [Trackback]

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

  39. winbet 娛樂 says:

    … [Trackback]

    […] Information on that Topic: dragon-ark.com/archives/80 […]

Leave a Reply