久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='pq31Z'></tfoot>

<small id='pq31Z'></small><noframes id='pq31Z'>

      • <bdo id='pq31Z'></bdo><ul id='pq31Z'></ul>
    1. <i id='pq31Z'><tr id='pq31Z'><dt id='pq31Z'><q id='pq31Z'><span id='pq31Z'><b id='pq31Z'><form id='pq31Z'><ins id='pq31Z'></ins><ul id='pq31Z'></ul><sub id='pq31Z'></sub></form><legend id='pq31Z'></legend><bdo id='pq31Z'><pre id='pq31Z'><center id='pq31Z'></center></pre></bdo></b><th id='pq31Z'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pq31Z'><tfoot id='pq31Z'></tfoot><dl id='pq31Z'><fieldset id='pq31Z'></fieldset></dl></div>

    2. <legend id='pq31Z'><style id='pq31Z'><dir id='pq31Z'><q id='pq31Z'></q></dir></style></legend>

      為什么 datetime.strptime 在這個簡單的例子中不起作

      Why is datetime.strptime not working in this simple example?(為什么 datetime.strptime 在這個簡單的例子中不起作用?)
      <tfoot id='5aotf'></tfoot>
          <tbody id='5aotf'></tbody>

        • <legend id='5aotf'><style id='5aotf'><dir id='5aotf'><q id='5aotf'></q></dir></style></legend>
          1. <i id='5aotf'><tr id='5aotf'><dt id='5aotf'><q id='5aotf'><span id='5aotf'><b id='5aotf'><form id='5aotf'><ins id='5aotf'></ins><ul id='5aotf'></ul><sub id='5aotf'></sub></form><legend id='5aotf'></legend><bdo id='5aotf'><pre id='5aotf'><center id='5aotf'></center></pre></bdo></b><th id='5aotf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5aotf'><tfoot id='5aotf'></tfoot><dl id='5aotf'><fieldset id='5aotf'></fieldset></dl></div>
            • <bdo id='5aotf'></bdo><ul id='5aotf'></ul>

                <small id='5aotf'></small><noframes id='5aotf'>

                本文介紹了為什么 datetime.strptime 在這個簡單的例子中不起作用?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在使用 strptime 來轉換日期字符串進入 datetime.根據鏈接頁面,這樣的格式應該可以工作:

                I'm using strptime to convert a date string into a datetime. According to the linked page, formatting like this should work:

                >>> # Using datetime.strptime()
                >>> dt = datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M")
                

                我的代碼是:

                import datetime
                dtDate = datetime.strptime(sDate,"%m/%d/%Y")
                

                其中 sDate = "07/27/2012".(我從同一頁了解到,%Y以世紀為十進制數的年份.")

                where sDate = "07/27/2012". (I understand, from the same page, that %Y is "Year with century as a decimal number.")

                我已經嘗試將 sDate 的實際值放入代碼中:

                I have tried putting the actual value of sDate into the code:

                dtDate = datetime.strptime("07/27/2012","%m/%d/%Y")
                

                但這不起作用.我得到的錯誤是:

                but this does not work. The error I get is:

                AttributeError: 'module' 對象沒有屬性 'strptime'

                AttributeError: 'module' object has no attribute 'strptime'

                我做錯了什么?

                推薦答案

                你應該使用 datetime.datetime.strptime.請注意,非常舊的 Python 版本(2.4 和更早版本)沒有 datetime.datetime.strptime;在這種情況下使用 time.strptime.

                You should be using datetime.datetime.strptime. Note that very old versions of Python (2.4 and older) don't have datetime.datetime.strptime; use time.strptime in that case.

                這篇關于為什么 datetime.strptime 在這個簡單的例子中不起作用?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How to bind a function to an Action from Qt menubar?(如何將函數綁定到 Qt 菜單欄中的操作?)
                PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應該可見
                `QImage` constructor has unknown keyword `data`(`QImage` 構造函數有未知關鍵字 `data`)
                Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)
                    <bdo id='HpmrI'></bdo><ul id='HpmrI'></ul>

                      <tbody id='HpmrI'></tbody>

                      <i id='HpmrI'><tr id='HpmrI'><dt id='HpmrI'><q id='HpmrI'><span id='HpmrI'><b id='HpmrI'><form id='HpmrI'><ins id='HpmrI'></ins><ul id='HpmrI'></ul><sub id='HpmrI'></sub></form><legend id='HpmrI'></legend><bdo id='HpmrI'><pre id='HpmrI'><center id='HpmrI'></center></pre></bdo></b><th id='HpmrI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HpmrI'><tfoot id='HpmrI'></tfoot><dl id='HpmrI'><fieldset id='HpmrI'></fieldset></dl></div>

                      1. <small id='HpmrI'></small><noframes id='HpmrI'>

                        • <legend id='HpmrI'><style id='HpmrI'><dir id='HpmrI'><q id='HpmrI'></q></dir></style></legend>
                        • <tfoot id='HpmrI'></tfoot>
                        • 主站蜘蛛池模板: 精品国产色 | 欧美一区二区三区在线视频 | 午夜免费在线 | 中文在线a在线 | 欧美小视频在线观看 | 精品一区二区三区四区视频 | 99riav国产一区二区三区 | 亚洲成人精品久久久 | 一级特黄视频 | 黄a免费看| 91传媒在线播放 | 亚洲日日夜夜 | 天天操夜夜操 | 午夜影院在线视频 | 欧美国产中文字幕 | 综合久久综合久久 | 狠狠的干 | 狠狠躁18三区二区一区 | 久久日韩精品 | 亚洲欧美日韩在线不卡 | 国产区精品 | 中文二区 | 国产精品久久久久一区二区三区 | 久久久久久综合 | 久久久久久久国产精品视频 | 日韩在线不卡 | 日韩毛片在线观看 | 久久精品视频播放 | 久久久日韩精品一区二区三区 | 日韩av免费在线观看 | 九色国产| 精品福利一区二区三区 | 亚洲一区视频 | 国产亚洲网站 | 中文日韩字幕 | 国产九九九| 精品一区二区久久久久久久网站 | 91久久国产综合久久 | 亚洲中午字幕 | 国产免费一区二区 | 国产精品久久久免费 |