{"id":9388,"date":"2017-12-20T15:00:45","date_gmt":"2017-12-20T06:00:45","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=9388"},"modified":"2017-12-20T15:20:31","modified_gmt":"2017-12-20T06:20:31","slug":"rss%e3%81%ae%e6%97%a5%e4%bb%98%e3%82%92%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8bvba%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=9388","title":{"rendered":"RSS\u306e\u65e5\u4ed8\u3092\u5909\u63db\u3059\u308bVBA\u30de\u30af\u30ed"},"content":{"rendered":"<p>RSS\u304b\u3089\u53d6\u5f97\u3057\u305f\u65e5\u4ed8(\u300cWed, 20 Dec 2017 00:02:41 +0000\u300d\u306e\u3088\u3046\u306aRFC-822\u5f62\u5f0f)\u3092\u3010\u5e74\/\u6708\/\u65e5 \u6642\u9593:\u5206:\u79d2\u3011\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u3001ScriptControl\u7d4c\u7531\u3067\u51e6\u7406\u3059\u308b\u30de\u30af\u30ed\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  Debug.Print ConvertDate(&quot;Wed, 20 Dec 2017 00:02:41 +0000&quot;)\r\nEnd Sub\r\n\r\nPrivate Function ConvertDate(ByVal dt As String) As String\r\n'RFC 822\u5f62\u5f0f\u306e\u65e5\u4ed8\u3092\u5909\u63db\r\n  Dim dtYear As String\r\n  Dim dtMonth As String\r\n  Dim dtDate As String\r\n  Dim dtHours As String\r\n  Dim dtMinutes As String\r\n  Dim dtSeconds As String\r\n  Dim ret As String\r\n  Dim d As Object\r\n  \r\n  With CreateObject(&quot;ScriptControl&quot;)\r\n    .Language = &quot;JScript&quot;\r\n    .AddCode &quot;function getDate(dt){return new Date(dt);}&quot;\r\n    Set d = .CodeObject.getDate(dt)\r\n    dtYear = CallByName(d, &quot;getFullYear&quot;, VbMethod)\r\n    dtMonth = ZeroPadding(CLng(CallByName(d, &quot;getMonth&quot;, VbMethod)) + 1, 2)\r\n    dtDate = ZeroPadding(CallByName(d, &quot;getDate&quot;, VbMethod), 2)\r\n    dtHours = ZeroPadding(CallByName(d, &quot;getHours&quot;, VbMethod), 2)\r\n    dtMinutes = ZeroPadding(CallByName(d, &quot;getMinutes&quot;, VbMethod), 2)\r\n    dtSeconds = ZeroPadding(CallByName(d, &quot;getSeconds&quot;, VbMethod), 2)\r\n  End With\r\n  ret = dtYear &amp; &quot;\/&quot; &amp; dtMonth &amp; &quot;\/&quot; &amp; dtDate &amp; &quot; &quot; &amp; dtHours &amp; &quot;:&quot; &amp; dtMinutes &amp; &quot;:&quot; &amp; dtSeconds\r\n  ConvertDate = ret\r\nEnd Function\r\n\r\nPrivate Function ZeroPadding(ByVal str As String, _\r\n                             ByVal digit As Long) As String\r\n'\u30bc\u30ed\u57cb\u3081\r\n  ZeroPadding = Right(String(digit, &quot;0&quot;) &amp; str, digit)\r\nEnd Function<\/pre>\n<p>\u4e0a\u8a18\u306e\u901a\u308aScriptControl\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u306e\u3067\u300164\u30d3\u30c3\u30c8\u7248\u306eOffice\u3067\u306f\u4f7f\u3048\u307e\u305b\u3093\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3067\u6271\u3044\u3084\u3059\u3044\u65e5\u4ed8\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n<h4 class=\"style4a\">Visual Basic Advent Calendar 2017<\/h4>\n<p><a href=\"https:\/\/qiita.com\/\" title=\"Qiita - \u30d7\u30ed\u30b0\u30e9\u30de\u306e\u6280\u8853\u60c5\u5831\u5171\u6709\u30b5\u30fc\u30d3\u30b9\" target=\"_blank\">Qiita<\/a>\u306e\u300c<a href=\"https:\/\/qiita.com\/advent-calendar\/2017\/vb\" title=\"Visual Basic Advent Calendar 2017 - Qiita\" target=\"_blank\">Visual Basic Advent Calendar 2017<\/a>\u300d\u306b<span style=\"color: #ff0000; font-weight: bold;\">\u201cOffice\u3067\u3082\u767a\u8868\u3067\u304d\u308bAdvent Calendar\u201d<\/span>\u3068\u3042\u3063\u305f\u306e\u3067\u3001\u6298\u89d2\u306a\u306e\u3067\u53c2\u52a0\u3055\u305b\u3066\u3044\u305f\u3060\u304f\u3053\u3068\u306b\u3057\u307e\u3057\u305f\uff01<br \/>\n(\u5927\u3057\u305f\u30cd\u30bf\u3067\u306a\u304f\u3066\u7533\u3057\u8a33\u306a\u3044\u30fb\u30fb\u30fb)<\/p>\n","protected":false},"excerpt":{"rendered":"RSS\u304b\u3089\u53d6\u5f97\u3057\u305f\u65e5\u4ed8(\u300cWed, 20 Dec 2017 00:02:41 +0000\u300d\u306e\u3088\u3046\u306aRFC-822\u5f62\u5f0f)\u3092\u3010\u5e74\/\u6708\/\u65e5 \u6642\u9593:\u5206:\u79d2\u3011\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u3001ScriptControl\u7d4c\u7531\u3067\u51e6\u7406\u3059\u308b [&hellip;]","protected":false},"author":1,"featured_media":7120,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"RFC-822\u5f62\u5f0f\u306e\u65e5\u4ed8\u3092VBA\u304b\u3089\u6271\u3044\u3084\u3059\u3044\u5f62\u306b\u5909\u63db\u3059\u308b\u30de\u30af\u30ed\u3067\u3059\u3002 [RSS\u306e\u65e5\u4ed8\u3092\u5909\u63db\u3059\u308bVBA\u30de\u30af\u30ed]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,48,49,58],"tags":[],"class_list":["post-9388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-word-office","category-powerpoint"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-OfficeVBA.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-2rq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9388"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9388\/revisions"}],"predecessor-version":[{"id":9389,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9388\/revisions\/9389"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7120"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}