Here is a tiny sample from my Outlook summary, that actually has 941 incoming emails from 50 people (names, etc., changed to protect the guilty!).
| From | Subject | Received | Size |
|---|---|---|---|
| Veronica | Topic A | 15/10/2025 | 32 KB |
| Graham | Topic B | Tue 14:25 | 32 KB |
| Geirge | Topic D | 30/10/2025 | 33 KB |
| Betty | Topic W | Wed 03/12 | 38 KB |
| Robert | Topic F | 01/04/2024 | 42 KB |
| Yvette | Topic J | 19/02/2024 | 99 KB |
I can sort the data by name, topic, or size—but NOT by date!
I cannot find a way to change that format in Outlook, so I have tried to create an Excel "function"—but nothing I have tried works :-(
Public Function DateFromOutlook(myDate As String) As String
' MicroSoft's Outlook gives the date of each file,
' but the format differes with the age of the file !
' 1 Old files - dd/mm/yyyy
' 2 This week - ddd dd/mm
' 3 Today - ddd hh:mm
' =IF(ISNUMBER(LEFT(C129,1)),C129,DATE(YEAR(TODAY()),MID(C129,5,2),RIGHT(C129,2)))
Dim myYear, myMonth, myDay
If IsADigit(Left(myDate, 1)) Then ' 1 Old files - dd/mm/yyyy
DateFromOutlook = myDate
ElseIf HowManyOfThese(myDate, "/") = 1 Then ' 2 This week - ddd dd/mm
myDay = WorksheetFunction.TODAY()
myYear = WorksheetFunction.Year(myDay)
myMonth = Right(myDate, 2)
myDay = Mid(myDate, 5, 2)
'DateFromOutlook=DATE(YEAR(TODAY()),MID(mydate,5,2),RIGHT(mydate,2)))
ElseIf HowManyOfThese(myDate, ":") = 1 Then ' 3 Today - ddd hh:mm
DateFromOutlook = WorksheetFunction.TODAY()
End If
End Function

