プログラムの中で、UTC(Universal Time Coordinate)を扱うことがあります。

UTCは、こんな↓データで、一目見てもいつなのか分かりにくいです。
“20081011000000.000000+540″

これを”YYYYMMDD HH:MM:SS” 形式に変換するWSHです。
(jscriptだと関数がありますが、vbsだとプログラムで生成するしかないと思います)

Option Explicit
Function ConvertUTCToDate(STR_DateTime)

  ConvertUTCToDate = CDate(Mid(STR_DateTime, 5, 2) & "/" & _
  Mid(STR_DateTime, 7, 2) & "/" & Left(STR_DateTime, 4) & " " & _
  Mid(STR_DateTime, 9, 2) & ":" & _
  Mid(STR_DateTime, 11, 2) & ":" & _
  Mid(STR_DateTime, 13, 2))

End Function

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

9 Comments

  1. microsoft exchange online plan 3 says:

    … [Trackback]

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

  2. hp server servis says:

    … [Trackback]

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

  3. microsoft exchange online plan 2 says:

    … [Trackback]

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

  4. Apps Knowledgebase says:

    … [Trackback]

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

  5. bulgarian makarov for sale says:

    … [Trackback]

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

  6. remington 700 adl says:

    … [Trackback]

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

  7. Unlimited Web Host from $0.99 says:

    … [Trackback]

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

  8. Fortune Games New Zealand says:

    … [Trackback]

    […] There you can find 17631 additional Info to that Topic: dragon-ark.com/archives/57 […]

  9. sagame says:

    … [Trackback]

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

Leave a Reply