Skip to content
Advertisement

Error while trying to get ReceivedTime from Win32com Python bib

I’m receiving an error while I’m trying to save a code that gets an outlook’s mail receivedTime. But I don’t know what possibly could done wrong. See the error below:

JavaScript

Can anyone help me?

The code:

JavaScript

Advertisement

Answer

The MailItem.ReceivedTime property returns a Date indicating the date and time at which the item was received.

Try to use any other date object in the code to see whether any difference exists, for example:

JavaScript

If that code works then you need to format the date object in the way which Excel understands. The Format function can help with that.

Advertisement