{"id":10334,"date":"2026-03-30T16:59:46","date_gmt":"2026-03-30T07:59:46","guid":{"rendered":"https:\/\/techmania.jp\/blog\/?p=10334"},"modified":"2026-03-30T18:02:55","modified_gmt":"2026-03-30T09:02:55","slug":"python-datetime","status":"publish","type":"post","link":"https:\/\/techmania.jp\/blog\/python-datetime\/","title":{"rendered":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002<br>\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u57fa\u3065\u3044\u305f\u6587\u5b57\u5217\u5909\u63db\u306a\u3069\u3001\u69d8\u3005\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u306f\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__1\" class=\"wp-block-heading\">Python\u306e datetime \u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u306f\uff1f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001Python\u306e\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306e1\u3064\u3067\u3042\u308a\u3001\u65e5\u6642\u306b\u95a2\u3059\u308b\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002<br>\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u69d8\u3005\u306a\u30af\u30e9\u30b9\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u4ed6\u3001\u65e5\u6642\u304b\u3089\u6587\u5b57\u5217\u3001\u6216\u3044\u306f\u6587\u5b57\u5217\u304b\u3089\u65e5\u6642\u3078\u3068\u3001\u30c7\u30fc\u30bf\u578b\u3092\u5909\u63db\u3059\u308b\u5404\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u591a\u69d8\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5bfe\u5fdc\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001\u300c\u3007\u3007\u65e5\u524d\u300d \u3084 \u300c\u3007\u3007\u6642\u9593\u5f8c\u300d \u3068\u3044\u3063\u305f\u3088\u3046\u306b\u3001\u7279\u5b9a\u306e\u65e5\u6642\u3092\u57fa\u306b\u65e5\u6570\u3084\u6642\u9593\u3092\u8a08\u7b97\u3059\u308b\u969b\u306b\u3001\u8db3\u3057\u7b97\u3084\u5f15\u304d\u7b97\u3092\u5229\u7528\u3057\u3066\u65e5\u6642\u3092\u6c42\u3081\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<br>\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u6642\u5dee\u3092\u8003\u616e\u3057\u305f\u6642\u523b\u306e\u8a08\u7b97\u3084\u6bd4\u8f03\u3092\u884c\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u7528\u9014\u306b\u5408\u308f\u305b\u3066\u4ee5\u4e0b\u306e\u30af\u30e9\u30b9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>datetime.datetime \u2026 \u65e5\u4ed8\u3068\u6642\u523b<\/li>\n\n\n\n<li>datetime.date \u2026 \u65e5\u4ed8<\/li>\n\n\n\n<li>datetime.time \u2026 \u6642\u523b<\/li>\n\n\n\n<li>datetime.timedelta \u2026 \u6642\u9593\u5dee (\u7d4c\u904e\u6642\u9593)<\/li>\n<\/ul>\n\n\n\n<h2 id=\"outline__2\" class=\"wp-block-heading\">datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f7f\u3044\u65b9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u306f\u3001\u65e5\u4ed8\u3068\u6642\u523b\u306e\u4e21\u65b9\u3092\u6271\u3046\u3053\u3068\u306e\u3067\u304d\u308b datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u3001\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u3092\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 id=\"outline__2_1\" class=\"wp-block-heading\">\u57fa\u672c\u69cb\u6587<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u901a\u3057\u3066\u3001\u4efb\u610f\u306e\u65e5\u6642\u306e datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, \u00a0fold=0)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #82AAFF\">datetime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">year<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> month<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> day<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">hour<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">minute<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">second<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">microsecond<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">tzinfo<\/span><span style=\"color: #89DDFF\">=None,<\/span><span style=\"color: #82AAFF\"> \u00a0<\/span><span style=\"color: #EEFFFF; font-style: italic\">fold<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e74(year)\u3001\u6708(month)\u3001\u65e5(day) \u306e3\u3064\u306e\u5f15\u6570\u304c\u5fc5\u9808\u9805\u76ee\u3067\u3001\u305d\u306e\u4ed6\u306e\u5f15\u6570\u306f\u7701\u7565\u53ef\u80fd\u3067\u3059\u3002<br>\u7701\u7565\u3057\u305f\u5834\u5408\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f 0 \u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001\u5404\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\u5024\u306f\u3001\u4ee5\u4e0b\u306e\u7bc4\u56f2\u306e\u6574\u6570\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>year \u2026 MINYEAR\u00a0&lt;=\u00a0year\u00a0&lt;=\u00a0MAXYEAR<\/li>\n\n\n\n<li>month \u2026 1\u00a0&lt;=\u00a0month\u00a0&lt;=\u00a012<\/li>\n\n\n\n<li>day \u2026 1\u00a0&lt;=\u00a0day\u00a0&lt;=\u00a0\u6307\u5b9a\u3057\u305f\u6708\u306e\u65e5\u6570<\/li>\n\n\n\n<li>hour \u2026 0\u00a0&lt;=\u00a0hour\u00a0&lt;\u00a024<\/li>\n\n\n\n<li>minute \u2026 0\u00a0&lt;=\u00a0minute\u00a0&lt;\u00a060<\/li>\n\n\n\n<li>second \u2026 0\u00a0&lt;=\u00a0second\u00a0&lt;\u00a060<\/li>\n\n\n\n<li>microsecond \u2026 0\u00a0&lt;=\u00a0microsecond\u00a0&lt;\u00a01000000<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime\n\ndate1 = datetime(2020, 1, 1)\n\ndate2 = datetime(2020, 12, 31, 15, 30, 20, 1000)\n\nprint(date1)\nprint(date2)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date1 <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">datetime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">2020<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date2 <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">datetime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">2020<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">12<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">31<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">15<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">30<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">20<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date1<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date2<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2020-01-01 00:00:00\n2020-12-31 15:30:20.001000<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2020-01-01 00:00:00<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">2020-12-31 15:30:20.001000<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 id=\"outline__2_2\" class=\"wp-block-heading\">datetime.now()\u3067\u73fe\u5728\u306e\u65e5\u4ed8\u3068\u6642\u523b\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u73fe\u5728\u6642\u523b\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001 datetime\u30af\u30e9\u30b9\u306e now\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime\n\ndate_now = datetime.now()\n\nprint(date_now)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date_now <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">now<\/span><span style=\"color: #89DDFF\">()<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2026-03-30 16:13:42.195420<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2026-03-30 16:13:42.195420<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u6307\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b\u6e21\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime\nfrom zoneinfo import ZoneInfo\n\nnow_usa = datetime.now(ZoneInfo(\"America\/Los_Angeles\"))\n\nprint(now_usa)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> zoneinfo <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> ZoneInfo<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">now_usa <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">now<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">ZoneInfo<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">America\/Los_Angeles<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">))<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">now_usa<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2026-03-30 00:27:13.661733-07:00<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2026-03-30 00:27:13.661733-07:00<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 id=\"outline__2_3\" class=\"wp-block-heading\">datetime\u3067\u4f7f\u7528\u3055\u308c\u308b\u4e3b\u306a\u5c5e\u6027<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">datetime\u30af\u30e9\u30b9\u306b\u306f\u3001\u69d8\u3005\u306a\u30af\u30e9\u30b9\u5c5e\u6027\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<br>\u305d\u306e\u4e2d\u3067\u3082\u4e3b\u306b\u4f7f\u7528\u3055\u308c\u308b\u5c5e\u6027\u306f\u3001\u4ee5\u4e0b\u306e\u5e74\u6708\u65e5\u3068\u6642\u5206\u79d2\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>year (\u5e74)<\/li>\n\n\n\n<li>month (\u6708)<\/li>\n\n\n\n<li>day (\u65e5)<\/li>\n\n\n\n<li>hour (\u6642)<\/li>\n\n\n\n<li>minute (\u5206)<\/li>\n\n\n\n<li>second (\u79d2)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u7279\u5b9a\u306e\u65e5\u6642\u3092\u53d6\u5f97\u3057\u305f datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u5404\u5c5e\u6027\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime\n\ndate_now = datetime.now()\n\nprint(f\"{date_now.year}\u5e74\")\nprint(f\"{date_now.month}\u6708\")\nprint(f\"{date_now.day}\u65e5\")\nprint(f\"{date_now.hour}\u6642\")\nprint(f\"{date_now.minute}\u5206\")\nprint(f\"{date_now.second}\u79d2\")<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date_now <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">now<\/span><span style=\"color: #89DDFF\">()<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">year<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u5e74&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">month<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u6708&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">day<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u65e5&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">hour<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u6642&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">minute<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u5206&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">second<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u79d2&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2026\u5e74\n3\u6708\n30\u65e5\n16\u6642\n48\u5206\n56\u79d2<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2026\u5e74<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">3\u6708<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">30\u65e5<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">16\u6642<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">48\u5206<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">56\u79d2<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5404\u5c5e\u6027\u306e\u5024\u306f\u3001int\u578b\u3067\u53d6\u5f97\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__3\" class=\"wp-block-heading\">date\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u65e5\u4ed8\u3092\u6271\u3046<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4e2d\u3067\u3001\u65e5\u4ed8\u306e\u307f\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u6271\u3046\u306e\u304c date\u30af\u30e9\u30b9\u3067\u3059\u3002<br>\u4ee5\u4e0b\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3001\u4efb\u610f\u306e\u65e5\u4ed8\u3092 date\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>date(year, month, day)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #82AAFF\">date<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">year<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> month<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> day<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u540c\u69d8\u306b\u3001year\u3001month\u3001day \u306e\uff13\u3064\u304c\u5fc5\u9808\u3068\u306a\u308b\u305f\u3081\u3001\u5f15\u6570\u306e\u7701\u7565\u306f\u3067\u304d\u307e\u305b\u3093\u3002<br>\u5024\u306e\u6307\u5b9a\u53ef\u80fd\u7bc4\u56f2\u306f datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u540c\u69d8\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import date\n\ndate = date(2020, 1, 1)\n\nprint(date)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> date<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">date<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">2020<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2020-01-01<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2020-01-01<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 id=\"outline__3_1\" class=\"wp-block-heading\">date.today()\u3067\u4eca\u65e5\u306e\u65e5\u4ed8\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">date\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u73fe\u5728\u306e\u65e5\u6642\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f\u3001today\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import date\n\ndate_now = date.today()\n\nprint(date_now)\n\n#datetime\u30af\u30e9\u30b9\u540c\u69d8\u3001\u5c5e\u6027\u3054\u3068\u306b\u53d6\u5f97\u53ef\u80fd\nprint(f\"{date_now.year}\u5e74{date_now.month}\u6708{date_now.day}\u65e5\")<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> date<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date_now <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> date<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">today<\/span><span style=\"color: #89DDFF\">()<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #546E7A; font-style: italic\">#datetime\u30af\u30e9\u30b9\u540c\u69d8\u3001\u5c5e\u6027\u3054\u3068\u306b\u53d6\u5f97\u53ef\u80fd<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #C792EA\">f<\/span><span style=\"color: #C3E88D\">&quot;<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">year<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u5e74<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">month<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u6708<\/span><span style=\"color: #F78C6C\">{<\/span><span style=\"color: #82AAFF\">date_now<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #F07178\">day<\/span><span style=\"color: #F78C6C\">}<\/span><span style=\"color: #C3E88D\">\u65e5&quot;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2026-03-30\n2026\u5e743\u670830\u65e5<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2026-03-30<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">2026\u5e743\u670830\u65e5<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 id=\"outline__4\" class=\"wp-block-heading\">time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u6642\u523b\u3092\u6271\u3046<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">date\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u65e5\u4ed8\u306e\u307f\u3092\u6271\u3046\u306e\u306b\u5bfe\u3057\u3001\u6642\u523b\u306e\u307f\u3092\u6271\u3046\u306e\u304c time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<br>\u4ee5\u4e0b\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3001\u4efb\u610f\u306e\u6642\u523b\u3092 time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>time(minute=0, second=0, microsecond=0, tzinfo=None, \u00a0fold=0)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #82AAFF\">time<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF; font-style: italic\">minute<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">second<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">microsecond<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">tzinfo<\/span><span style=\"color: #89DDFF\">=None,<\/span><span style=\"color: #82AAFF\"> \u00a0<\/span><span style=\"color: #EEFFFF; font-style: italic\">fold<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5834\u5408\u306f\u3001\u5168\u3066\u306e\u5f15\u6570\u3092\u7701\u7565\u53ef\u80fd\u3067\u3059\u3002<br>\u7701\u7565\u3057\u305f\u5834\u5408\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u4e0a\u8ff0\u306e\u901a\u308a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5024\u306e\u6307\u5b9a\u53ef\u80fd\u7bc4\u56f2\u306f\u3001\u3053\u3061\u3089\u3082 datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u540c\u69d8\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import time\n\ntime = time(15, 30, 20, 1000)\n\nprint(time)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> time<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">time <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">time<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">15<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">30<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">20<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">time<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>15:30:20.001000<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">15:30:20.001000<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 id=\"outline__4_1\" class=\"wp-block-heading\">time()\u30e1\u30bd\u30c3\u30c9\u3067datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u3001datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3084 date\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3042\u3063\u305f\u3088\u3046\u306a\u73fe\u5728\u6642\u523b\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u305f\u3081\u3001\u73fe\u5728\u6642\u523b\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001datetime.now()\u3067\u73fe\u5728\u65e5\u6642\u3092\u53d6\u5f97\u3057\u3066\u304b\u3089\u3001time\u30e1\u30bd\u30c3\u30c9\u3067 time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime, time\n\ntime_now = datetime.now().time()\n\nprint(time_now)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> time<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">time_now <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">now<\/span><span style=\"color: #89DDFF\">().<\/span><span style=\"color: #82AAFF\">time<\/span><span style=\"color: #89DDFF\">()<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">time_now<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>17:46:25.513250<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">17:46:25.513250<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 id=\"outline__5\" class=\"wp-block-heading\">timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u6642\u9593\u5dee\u3084\u7d4c\u904e\u6642\u9593\u3092\u8868\u73fe\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3064\u306e\u65e5\u6642\u306e\u6642\u9593\u5dee\u3092\u6c42\u3081\u308b\u5834\u5408\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<br>\u4f7f\u7528\u3059\u308b\u969b\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u3001\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #82AAFF\">timedelta<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF; font-style: italic\">days<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">seconds<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">microseconds<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">milliseconds<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">minutes<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">hours<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #EEFFFF; font-style: italic\">weeks<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f15\u6570\u306f\u5168\u3066\u7701\u7565\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6240\u6301\u3059\u308b\u60c5\u5831\u306f days,&nbsp;seconds,&nbsp;microseconds&nbsp;\u306e3\u3064\u306e\u307f\u3067\u3001\u305d\u306e\u4ed6\u306e\u5f15\u6570\u306f\u4ee5\u4e0b\u306e\u57fa\u6e96\u3067\u305d\u308c\u305e\u308c\u5909\u63db\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1 \u30df\u30ea\u79d2 = 1000 \u30de\u30a4\u30af\u30ed\u79d2\u306b\u5909\u63db<\/li>\n\n\n\n<li>1 \u5206 = 60 \u79d2\u306b\u5909\u63db<\/li>\n\n\n\n<li>1 \u6642\u9593 =\u001d 3600 \u79d2\u306b\u5909\u63db<\/li>\n\n\n\n<li>1 \u9031\u9593 = 7 \u65e5\u306b\u5909\u63db<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u306e\u8db3\u3057\u7b97\u3084\u5f15\u304d\u7b97\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime, timedelta\n\ndate = datetime(2020, 12, 31, 15, 30, 20, 1000)\n\nprint(date + timedelta(weeks=1))\nprint(date - timedelta(hours=1))<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> timedelta<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">datetime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">2020<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">12<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">31<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">15<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">30<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">20<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date <\/span><span style=\"color: #89DDFF\">+<\/span><span style=\"color: #82AAFF\"> timedelta<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF; font-style: italic\">weeks<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date <\/span><span style=\"color: #89DDFF\">-<\/span><span style=\"color: #82AAFF\"> timedelta<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #EEFFFF; font-style: italic\">hours<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #89DDFF\">))<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2021-01-07 15:30:20.001000\n2020-12-31 14:30:20.001000<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2021-01-07 15:30:20.001000<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">2020-12-31 14:30:20.001000<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540c\u58eb\u3084 date\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540c\u58eb\u3067\u5f15\u304d\u7b97\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u3001\u305d\u306e\u5834\u5408\u306e\u7d50\u679c\u306f timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime, timedelta\n\ndate1 = datetime(2020, 12, 31, 17, 30, 20, 1000)\ndate2 = datetime(2020, 11, 30, 15, 40, 10, 1000)\n\nresult = date1 - date2\n\nprint(result)\nprint(type(result))<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #EEFFFF\"> timedelta<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date1 <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">datetime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">2020<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">12<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">31<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">17<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">30<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">20<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date2 <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">datetime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">2020<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">11<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">30<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">15<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">40<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">10<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">result <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> date1 <\/span><span style=\"color: #89DDFF\">-<\/span><span style=\"color: #EEFFFF\"> date2<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">result<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #FFCB6B\">type<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">result<\/span><span style=\"color: #89DDFF\">))<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>31 days, 1:50:10\n&lt;class 'datetime.timedelta'><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">31 days, 1:50:10<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">&lt;class &#39;datetime.timedelta&#39;&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 id=\"outline__6\" class=\"wp-block-heading\">datetime\u3068\u6587\u5b57\u5217\u306e\u5909\u63db<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u308c\u305e\u308c\u5bfe\u5fdc\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001datetime\u304b\u3089\u6587\u5b57\u5217\u3078\u3001\u3042\u308b\u3044\u306f\u6587\u5b57\u5217\u304b\u3089 datetime\u3078\u3068\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u305d\u308c\u305e\u308c\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 id=\"outline__6_1\" class=\"wp-block-heading\">strftime()\u3067\u65e5\u4ed8\u30fb\u6642\u523b\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">datetime,&nbsp;date,&nbsp;time \u30af\u30e9\u30b9\u304c\u305d\u308c\u305e\u308c\u4fdd\u6301\u3059\u308b strftime\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u4fdd\u6301\u3059\u308b\u5404\u7a2e\u60c5\u5831\u306f\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b\u6307\u5b9a\u3057\u305f\u4efb\u610f\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5f93\u3063\u3066\u5909\u63db\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u5fdc\u3059\u308b\u66f8\u5f0f\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u305f\u6587\u5b57\u5217\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u4f8b\u306e\u3088\u3046\u306a\u69cb\u6587\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>date.strftime('%Y\/%m\/%d %H:%M:%S.%f')<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">date<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">strftime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">%Y\/%m\/<\/span><span style=\"color: #F78C6C\">%d<\/span><span style=\"color: #C3E88D\"> %H:%M:%S.<\/span><span style=\"color: #F78C6C\">%f<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">%\u3068\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u8868\u73fe\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u304c\u66f8\u5f0f\u30b3\u30fc\u30c9\u3067\u3059\u3002<br>\u4ee3\u8868\u7684\u306a\u66f8\u5f0f\u30b3\u30fc\u30c9\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>%d \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u65e5\u306b\u3061<\/li>\n\n\n\n<li>%m \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u6708<\/li>\n\n\n\n<li>%y \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u897f\u66a6(\u4e0b2\u6841)<\/li>\n\n\n\n<li>%Y \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u897f\u66a6(4\u6841)<\/li>\n\n\n\n<li>%H \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u6642 \uff0824\u6642\u9593\u8868\u8a18\uff09<\/li>\n\n\n\n<li>%I \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u6642 \uff0812\u6642\u9593\u8868\u8a18\uff09<\/li>\n\n\n\n<li>%M \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u5206<\/li>\n\n\n\n<li>%S \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u79d2<\/li>\n\n\n\n<li>%f \u2026 0\u57cb\u3081\u3057\u305f10\u9032\u6570\u8868\u8a18\u306e\u30de\u30a4\u30af\u30ed\u79d2\uff086\u6841\uff09<\/li>\n\n\n\n<li>%A \u2026 \u66dc\u65e5\u540d<\/li>\n\n\n\n<li>%a \u2026 \u66dc\u65e5\u540d\uff08\u77ed\u7e2e\u5f62\uff09<\/li>\n\n\n\n<li>%B \u2026 \u6708\u540d<\/li>\n\n\n\n<li>%b \u2026 \u6708\u540d\uff08\u77ed\u7e2e\u5f62\uff09<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime\n\ndate = datetime(2020, 12, 31, 17, 30, 20, 1000)\n\ndate_str1 = date.strftime('%Y\/%m\/%d %H:%M:%S.%f')\ndate_str2 = date.strftime('%Y\u5e74%m\u6708%d\u65e5 %H\u6642%M\u5206%S\u79d2')\n\nprint(date_str1)\nprint(date_str2)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">datetime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #F78C6C\">2020<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">12<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">31<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">17<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">30<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">20<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> <\/span><span style=\"color: #F78C6C\">1000<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date_str1 <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> date<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">strftime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">%Y\/%m\/<\/span><span style=\"color: #F78C6C\">%d<\/span><span style=\"color: #C3E88D\"> %H:%M:%S.<\/span><span style=\"color: #F78C6C\">%f<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date_str2 <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> date<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">strftime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">%Y\u5e74%m\u6708<\/span><span style=\"color: #F78C6C\">%d<\/span><span style=\"color: #C3E88D\">\u65e5 %H\u6642%M\u5206%S\u79d2<\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date_str1<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date_str2<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u3088\u3046\u306b\u3001\u4efb\u610f\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 id=\"outline__6_2\" class=\"wp-block-heading\">strptime()\u3067\u6587\u5b57\u5217\u3092\u65e5\u4ed8\u30fb\u6642\u523b\u306b\u5909\u63db\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u53cd\u5bfe\u306b\u3001datetime\u30af\u30e9\u30b9\u306e strptime\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u6587\u5b57\u5217\u3092 datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>datetime.strptime(\u5bfe\u8c61\u6587\u5b57\u5217, \u30d5\u30a9\u30fc\u30de\u30c3\u30c8)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">datetime<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">strptime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">\u5bfe\u8c61\u6587\u5b57\u5217<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> \u30d5\u30a9\u30fc\u30de\u30c3\u30c8<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e1\u30bd\u30c3\u30c9\u306e\u7b2c\u4e00\u5f15\u6570\u306b\u5909\u63db\u5bfe\u8c61\u306e\u6587\u5b57\u5217\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u6587\u5b57\u5217\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from datetime import datetime\n\ndate_str = '2020\/12\/31 17:30:20.001000'\nstr_format = '%Y\/%m\/%d %H:%M:%S.%f'\n\ndate = datetime.strptime(date_str, str_format)\n\nprint(date)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF; font-style: italic\">from<\/span><span style=\"color: #EEFFFF\"> datetime <\/span><span style=\"color: #89DDFF; font-style: italic\">import<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date_str <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">2020\/12\/31 17:30:20.001000<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">str_format <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #89DDFF\">&#39;<\/span><span style=\"color: #C3E88D\">%Y\/%m\/<\/span><span style=\"color: #F78C6C\">%d<\/span><span style=\"color: #C3E88D\"> %H:%M:%S.<\/span><span style=\"color: #F78C6C\">%f<\/span><span style=\"color: #89DDFF\">&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">date <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> datetime<\/span><span style=\"color: #89DDFF\">.<\/span><span style=\"color: #82AAFF\">strptime<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date_str<\/span><span style=\"color: #89DDFF\">,<\/span><span style=\"color: #82AAFF\"> str_format<\/span><span style=\"color: #89DDFF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #82AAFF\">print<\/span><span style=\"color: #89DDFF\">(<\/span><span style=\"color: #82AAFF\">date<\/span><span style=\"color: #89DDFF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#304047;color:#d5ffff\">\u5b9f\u884c\u7d50\u679c<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>2020-12-31 17:30:20.001000<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme\" style=\"background-color: #263238\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #EEFFFF\">2020-12-31 17:30:20.001000<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3067\u3001strftime\u30e1\u30bd\u30c3\u30c9\u3067\u5225\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3078\u3068\u5909\u63db\u3057\u305f\u308a\u3001timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u65e5\u6570\u8a08\u7b97\u3092\u884c\u3063\u305f\u308a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 id=\"outline__7\" class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3044\u304b\u304c\u3067\u3057\u305f\u304b\uff1f\u4eca\u56de\u306f\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<br>\u5404\u30af\u30e9\u30b9\u3054\u3068\u306b\u6271\u3048\u308b\u60c5\u5831\u3084\u4f7f\u7528\u3067\u304d\u308b\u30e1\u30bd\u30c3\u30c9\u306e\u7a2e\u985e\u304c\u7570\u306a\u308b\u306e\u3067\u3001\u4f7f\u7528\u7528\u9014\u306b\u5408\u308f\u305b\u3066\u9069\u5207\u306b\u4f7f\u3044\u5206\u3051\u3089\u308c\u308b\u3088\u3046\u3001\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30b9\u306e\u9055\u3044\u3092\u3057\u3063\u304b\u308a\u3068\u628a\u63e1\u3057\u3066\u304a\u304f\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 id=\"outline__8\" class=\"wp-block-heading\">Python\u306e\u52c9\u5f37\u65b9\u6cd5\u306f\uff1f<\/h2>\n\n\n<p>\u66f8\u7c4d\u3084\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3067\u5b66\u7fd2\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u6628\u4eca\u3067\u306f\u3001YouTube\u306a\u3069\u306e\u52d5\u753b\u30b5\u30a4\u30c8\u3084\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30a4\u30c8\u306a\u3069\u3082\u5145\u5b9f\u3057\u3066\u3044\u3066\u591a\u304f\u306e\u60c5\u5831\u304c\u624b\u306b\u5165\u308a\u307e\u3059\u3002<br \/>\u305d\u3057\u3066\u3001\u3088\u308a\u52b9\u7387\u7684\u306b\u77e5\u8b58\u30fb\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3059\u308b\u306b\u306f\u3001\u77e5\u8b58\u3092\u3064\u3051\u306a\u304c\u3089\u5b9f\u969b\u306b\u624b\u3092\u52d5\u304b\u3057\u3066\u307f\u308b\u306a\u3069\u3001\u30a4\u30f3\u30d7\u30c3\u30c8\u3068\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u7279\u306b\u72ec\u5b66\u306e\u5834\u5408\u306f\u3001\u6709\u8b58\u8005\u306b\u8cea\u554f\u304c\u3067\u304d\u305f\u308a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u3082\u3089\u3048\u308b\u3088\u3046\u306a\u74b0\u5883\u304c\u3042\u308b\u3068\u3001\u7406\u89e3\u5ea6\u304c\u6df1\u307e\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305f\u3060\u3001Python\u306b\u9650\u3089\u305a\u3001IT\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u308b\u969b\u3001\u3069\u3046\u3057\u3066\u3082\u8ab2\u984c\u306b\u3076\u3064\u304b\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u306f\u3042\u308a\u307e\u3059\u3088\u306d\u3002\u7279\u306b\u72ec\u5b66\u3060\u3068\u3001\u308f\u304b\u3089\u306a\u3044\u90e8\u5206\u3092\u30d7\u30ed\u306b\u8cea\u554f\u3067\u304d\u308b\u6a5f\u4f1a\u3092\u78ba\u4fdd\u3057\u306b\u304f\u304f\u3001\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u304c\u7d9a\u304d\u306b\u304f\u3044\u3068\u3044\u3046\u5074\u9762\u304c\u3042\u308a\u307e\u3059\u3002\u72ec\u5b66\u3067\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u3092\u7dad\u6301\u3059\u308b\u81ea\u4fe1\u304c\u306a\u3044\u4eba\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3068\u3044\u3046\u624b\u3082\u3042\u308a\u307e\u3059\u3002\u8cbb\u7528\u306f\u639b\u304b\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5206\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u3084\u3059\u3044\u3067\u3059\u3002\u3057\u3063\u304b\u308a\u3068\u77e5\u8b58\u30fb\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3057\u3066\u5b9f\u8df5\u306b\u6d3b\u304b\u3057\u305f\u3044\u3068\u3044\u3046\u4eba\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/p>\n<p><span class=\"markerYellow\"><strong>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u306a\u3089\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u304c\u304a\u3059\u3059\u3081\uff01<\/strong><\/span><\/p>\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/yuudou.png\" class=\"post-img\" loading=\"lazy\">\n\n\n\n<p class=\"wp-block-paragraph\">IT\u30b9\u30ad\u30eb\u9700\u8981\u306e\u9ad8\u307e\u308a\u3068\u3068\u3082\u306b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3082\u5897\u3048\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3069\u306e\u30b9\u30af\u30fc\u30eb\u306b\u901a\u3046\u3079\u304d\u304b\u8ff7\u3063\u3066\u3057\u307e\u3046\u4eba\u3082\u3044\u308b\u3067\u3057\u3087\u3046\u3002\u305d\u3093\u306a\u65b9\u306b\u306f\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\uff01\u3053\u308c\u307e\u3067\u591a\u304f\u306eIT\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u80b2\u6210\u30fb\u8f29\u51fa\u3057\u3066\u304d\u305f\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u3067\u3082\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3092\u958b\u8b1b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\uff1c\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u306e\u7279\u5fb4\uff1e<\/strong><br><strong>\u30fb\u305f\u3057\u304b\u306a\u80b2\u6210\u5b9f\u7e3e\u3068\u89aa\u8eab\u306a\u6559\u80b2\u3000\uff5e\u30bb\u30ab\u30f3\u30c9\u30ad\u30e3\u30ea\u30a2\u3092\u5168\u529b\u652f\u63f4\uff5e<\/strong><br><strong>\u30fb\u8b1b\u5e2b\u304c\u73fe\u5f79\u30a8\u30f3\u30b8\u30cb\u30a2\u3000\uff5e\u201c\u672c\u5f53\u201d\u306e\u958b\u767a\u30ce\u30a6\u30cf\u30a6\u3092\u76f4\u306b\u5b66\u3079\u308b\uff5e<\/strong><br><strong>\u30fb\u5c02\u5c5e\u8b1b\u5e2b\u304c\u5b66\u7fd2\u3092\u5fb9\u5e95\u30b5\u30dd\u30fc\u30c8\u3000\uff5e\u300c\u308f\u304b\u3089\u306a\u3044\u300d\u3092\u5fb9\u5e95\u89e3\u6c7a\uff5e<\/strong><br><strong>\u30fb\u5b9f\u52d9\u30d9\u30fc\u30b9\u3067\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3000\uff5e\u5b9f\u8df5\u7684\u306a\u51dd\u7e2e\u30ab\u30ea\u30ad\u30e5\u30e9\u30e0\uff5e<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u3088\u3046\u306a\u7279\u5fb4\u3092\u6301\u3064\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u306fIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30b9\u30bf\u30fc\u30c8\u30e9\u30a4\u30f3\u3068\u3057\u3066\u6700\u9069\u3067\u3059\u3002<br>\u8a71\u3092\u805e\u304d\u305f\u3044\u30fb\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u3068\u3044\u3046\u65b9\u306f<a href=\"https:\/\/techmania.jp\/lp\/2\" target=\"_blank\" rel=\"noreferrer noopener\">\u3053\u3061\u3089<\/a>\u304b\u3089\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u57fa\u3065\u3044\u305f\u6587\u5b57\u5217\u5909\u63db\u306a\u3069\u3001\u69d8\u3005\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u4eca\u56de\u306f\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 Python\u306e datetime \u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u306f\uff1f datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001Python\u306e\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306e1\u3064\u3067\u3042\u308a\u3001\u65e5\u6642\u306b\u95a2\u3059\u308b [&hellip;]","protected":false},"author":12,"featured_media":10345,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"fifu_image_url":"https:\/\/web-img.rensa.jp.net\/images\/techmania\/thumbnail\/images\/datetime.webp","fifu_image_alt":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b","footnotes":""},"categories":[15],"tags":[],"class_list":["post-10334","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u7de8\u96c6\u90e8\u3000\u65e9\u5ddd\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/techmania.jp\/blog\/python-datetime\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TechMania |\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b | TechMania\" \/>\n\t\t<meta property=\"og:description\" content=\"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/techmania.jp\/blog\/python-datetime\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2023\/07\/logo2.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2023\/07\/logo2.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1368\" \/>\n\t\t<meta property=\"og:image:height\" content=\"196\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-03-30T07:59:46+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-03-30T09:02:55+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b | TechMania\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2023\/07\/logo2.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#blogposting\",\"name\":\"\\u3010Python\\u5165\\u9580\\u3011datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u65e5\\u4ed8\\u3084\\u6642\\u523b\\u3092\\u64cd\\u4f5c\\u3059\\u308b | TechMania\",\"headline\":\"\\u3010Python\\u5165\\u9580\\u3011datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u65e5\\u4ed8\\u3084\\u6642\\u523b\\u3092\\u64cd\\u4f5c\\u3059\\u308b\",\"author\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/author\\\/k-h\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/web-img.rensa.jp.net\\\/images\\\/techmania\\\/thumbnail\\\/images\\\/datetime.webp\",\"width\":599,\"height\":401,\"caption\":\"\\u3010Python\\u5165\\u9580\\u3011datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u65e5\\u4ed8\\u3084\\u6642\\u523b\\u3092\\u64cd\\u4f5c\\u3059\\u308b\"},\"datePublished\":\"2026-03-30T16:59:46+09:00\",\"dateModified\":\"2026-03-30T18:02:55+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#webpage\"},\"articleSection\":\"Programming\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog#listItem\",\"position\":1,\"name\":\"\\u30db\\u30fc\\u30e0\",\"item\":\"https:\\\/\\\/techmania.jp\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#listItem\",\"name\":\"\\u3010Python\\u5165\\u9580\\u3011datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u65e5\\u4ed8\\u3084\\u6642\\u523b\\u3092\\u64cd\\u4f5c\\u3059\\u308b\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog#listItem\",\"name\":\"\\u30db\\u30fc\\u30e0\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#listItem\",\"position\":3,\"name\":\"\\u3010Python\\u5165\\u9580\\u3011datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u65e5\\u4ed8\\u3084\\u6642\\u523b\\u3092\\u64cd\\u4f5c\\u3059\\u308b\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/#organization\",\"name\":\"TechMania\",\"description\":\"\\u30a8\\u30f3\\u30b8\\u30cb\\u30a2\\uff06\\u30af\\u30ea\\u30a8\\u30a4\\u30bf\\u30fc\\u306e\\u6848\\u4ef6\\u30fb\\u6c42\\u4eba\\u30fb\\u30b9\\u30af\\u30fc\\u30eb\\u30b5\\u30a4\\u30c8\\u3010\\u30c6\\u30c3\\u30af\\u30de\\u30cb\\u30a2\\u3011\\u3002\\u8ee2\\u8077\\u652f\\u63f4\\u3084\\u30d5\\u30ea\\u30fc\\u30e9\\u30f3\\u30b9\\u5411\\u3051\\u306e\\u6848\\u4ef6\\u60c5\\u5831\\u3001\\u696d\\u754c\\u30d6\\u30ed\\u30b0\\u306a\\u3069\\u3084\\u52c9\\u5f37\\u4f1a\\u30bb\\u30df\\u30ca\\u30fc\\u3092\\u901a\\u3058\\u3066\\u30a8\\u30f3\\u30b8\\u30cb\\u30a2\\u3084\\u30af\\u30ea\\u30a8\\u30a4\\u30bf\\u30fc\\u306e\\u30b9\\u30ad\\u30eb\\u30a2\\u30c3\\u30d7\\u3084\\u6210\\u9577\\u306b\\u8ca2\\u732e\\u3055\\u305b\\u3066\\u3044\\u305f\\u3060\\u304d\\u307e\\u3059\\u3002\",\"url\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo2.png\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#organizationLogo\",\"width\":1368,\"height\":196},\"image\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/author\\\/k-h\\\/#author\",\"url\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/author\\\/k-h\\\/\",\"name\":\"\\u30c6\\u30c3\\u30af\\u30de\\u30cb\\u30a2\\u7de8\\u96c6\\u90e8\\u3000\\u65e9\\u5ddd\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3efd10a50c6027d326cce83db9bfd1e00de2edb5a323b312022e637f1c55f3e?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"\\u30c6\\u30c3\\u30af\\u30de\\u30cb\\u30a2\\u7de8\\u96c6\\u90e8\\u3000\\u65e9\\u5ddd\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#webpage\",\"url\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/\",\"name\":\"\\u3010Python\\u5165\\u9580\\u3011datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u65e5\\u4ed8\\u3084\\u6642\\u523b\\u3092\\u64cd\\u4f5c\\u3059\\u308b | TechMania\",\"description\":\"Python\\u3067\\u65e5\\u6642\\u3092\\u6271\\u3046\\u969b\\u306b\\u4f7f\\u7528\\u3059\\u308b\\u306e\\u304c\\u3001datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u3059\\u3002\\u65e5\\u6642\\u306e\\u53d6\\u5f97\\u3084\\u65e5\\u6570\\u8a08\\u7b97\\u3001\\u7279\\u5b9a\\u306e\\u30d5\\u30a9\\u30fc\\u30de\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/author\\\/k-h\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/author\\\/k-h\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/web-img.rensa.jp.net\\\/images\\\/techmania\\\/thumbnail\\\/images\\\/datetime.webp\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#mainImage\",\"width\":599,\"height\":401,\"caption\":\"\\u3010Python\\u5165\\u9580\\u3011datetime\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\\u3067\\u65e5\\u4ed8\\u3084\\u6642\\u523b\\u3092\\u64cd\\u4f5c\\u3059\\u308b\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/python-datetime\\\/#mainImage\"},\"datePublished\":\"2026-03-30T16:59:46+09:00\",\"dateModified\":\"2026-03-30T18:02:55+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/\",\"name\":\"TechMania\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/techmania.jp\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b | TechMania","description":"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de","canonical_url":"https:\/\/techmania.jp\/blog\/python-datetime\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#blogposting","name":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b | TechMania","headline":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b","author":{"@id":"https:\/\/techmania.jp\/blog\/author\/k-h\/#author"},"publisher":{"@id":"https:\/\/techmania.jp\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/web-img.rensa.jp.net\/images\/techmania\/thumbnail\/images\/datetime.webp","width":599,"height":401,"caption":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b"},"datePublished":"2026-03-30T16:59:46+09:00","dateModified":"2026-03-30T18:02:55+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#webpage"},"isPartOf":{"@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#webpage"},"articleSection":"Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/techmania.jp\/blog#listItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/techmania.jp\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/techmania.jp\/blog\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/techmania.jp\/blog\/category\/programming\/#listItem","position":2,"name":"Programming","item":"https:\/\/techmania.jp\/blog\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#listItem","name":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b"},"previousItem":{"@type":"ListItem","@id":"https:\/\/techmania.jp\/blog#listItem","name":"\u30db\u30fc\u30e0"}},{"@type":"ListItem","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#listItem","position":3,"name":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b","previousItem":{"@type":"ListItem","@id":"https:\/\/techmania.jp\/blog\/category\/programming\/#listItem","name":"Programming"}}]},{"@type":"Organization","@id":"https:\/\/techmania.jp\/blog\/#organization","name":"TechMania","description":"\u30a8\u30f3\u30b8\u30cb\u30a2\uff06\u30af\u30ea\u30a8\u30a4\u30bf\u30fc\u306e\u6848\u4ef6\u30fb\u6c42\u4eba\u30fb\u30b9\u30af\u30fc\u30eb\u30b5\u30a4\u30c8\u3010\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u3011\u3002\u8ee2\u8077\u652f\u63f4\u3084\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u5411\u3051\u306e\u6848\u4ef6\u60c5\u5831\u3001\u696d\u754c\u30d6\u30ed\u30b0\u306a\u3069\u3084\u52c9\u5f37\u4f1a\u30bb\u30df\u30ca\u30fc\u3092\u901a\u3058\u3066\u30a8\u30f3\u30b8\u30cb\u30a2\u3084\u30af\u30ea\u30a8\u30a4\u30bf\u30fc\u306e\u30b9\u30ad\u30eb\u30a2\u30c3\u30d7\u3084\u6210\u9577\u306b\u8ca2\u732e\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002","url":"https:\/\/techmania.jp\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2023\/07\/logo2.png","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#organizationLogo","width":1368,"height":196},"image":{"@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/techmania.jp\/blog\/author\/k-h\/#author","url":"https:\/\/techmania.jp\/blog\/author\/k-h\/","name":"\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u7de8\u96c6\u90e8\u3000\u65e9\u5ddd","image":{"@type":"ImageObject","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/f3efd10a50c6027d326cce83db9bfd1e00de2edb5a323b312022e637f1c55f3e?s=96&d=mm&r=g","width":96,"height":96,"caption":"\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u7de8\u96c6\u90e8\u3000\u65e9\u5ddd"}},{"@type":"WebPage","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#webpage","url":"https:\/\/techmania.jp\/blog\/python-datetime\/","name":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b | TechMania","description":"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de","inLanguage":"ja","isPartOf":{"@id":"https:\/\/techmania.jp\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#breadcrumblist"},"author":{"@id":"https:\/\/techmania.jp\/blog\/author\/k-h\/#author"},"creator":{"@id":"https:\/\/techmania.jp\/blog\/author\/k-h\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/web-img.rensa.jp.net\/images\/techmania\/thumbnail\/images\/datetime.webp","@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#mainImage","width":599,"height":401,"caption":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b"},"primaryImageOfPage":{"@id":"https:\/\/techmania.jp\/blog\/python-datetime\/#mainImage"},"datePublished":"2026-03-30T16:59:46+09:00","dateModified":"2026-03-30T18:02:55+09:00"},{"@type":"WebSite","@id":"https:\/\/techmania.jp\/blog\/#website","url":"https:\/\/techmania.jp\/blog\/","name":"TechMania","inLanguage":"ja","publisher":{"@id":"https:\/\/techmania.jp\/blog\/#organization"}}]},"og:locale":"ja_JP","og:site_name":"TechMania |","og:type":"article","og:title":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b | TechMania","og:description":"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de","og:url":"https:\/\/techmania.jp\/blog\/python-datetime\/","og:image":"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2023\/07\/logo2.png","og:image:secure_url":"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2023\/07\/logo2.png","og:image:width":1368,"og:image:height":196,"article:published_time":"2026-03-30T07:59:46+00:00","article:modified_time":"2026-03-30T09:02:55+00:00","twitter:card":"summary","twitter:title":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b | TechMania","twitter:description":"Python\u3067\u65e5\u6642\u3092\u6271\u3046\u969b\u306b\u4f7f\u7528\u3059\u308b\u306e\u304c\u3001datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u65e5\u6642\u306e\u53d6\u5f97\u3084\u65e5\u6570\u8a08\u7b97\u3001\u7279\u5b9a\u306e\u30d5\u30a9\u30fc\u30de","twitter:image":"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2023\/07\/logo2.png"},"aioseo_meta_data":[],"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/techmania.jp\/blog\" title=\"\u30db\u30fc\u30e0\">\u30db\u30fc\u30e0<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/techmania.jp\/blog\/category\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"\u30db\u30fc\u30e0","link":"https:\/\/techmania.jp\/blog"},{"label":"Programming","link":"https:\/\/techmania.jp\/blog\/category\/programming\/"},{"label":"\u3010Python\u5165\u9580\u3011datetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u65e5\u4ed8\u3084\u6642\u523b\u3092\u64cd\u4f5c\u3059\u308b","link":"https:\/\/techmania.jp\/blog\/python-datetime\/"}],"_links":{"self":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/10334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/comments?post=10334"}],"version-history":[{"count":10,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/10334\/revisions"}],"predecessor-version":[{"id":10399,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/10334\/revisions\/10399"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/media\/10345"}],"wp:attachment":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/media?parent=10334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/categories?post=10334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/tags?post=10334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}