![](/img/trans.png)
[英]Create and send an e-mail with a scheduled time in outlook with python
[英]Microsecond must be in 0..999999 (Get outlook e-mail time)
我想提取收件箱中每封電子郵件的接收日期和時間,但出現微秒錯誤。
如何在沒有微秒的情況下獲得 outlook email 時間? 有沒有辦法剝離它?
import win32com.client
import csv
import pandas as pd
head = [("Subject","Body","receivedtime")]
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
root_folder = outlook.Folders.item(1)
inbox2020= root_folder.Folders["Caixa de Entrada 2020"]
messages = inbox2020.Items
message = messages.GetFirst()
print (message.receivedtime)
使用 senton 而不是 receivedtime 找到解決方案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.