Closed PorreKaj closed 4 years ago
I think that's a choice that a tenant can make. If you want to use format s, go ahead and create your own version of the script.
With some fields populated bu text, the column will never be sortable as dates. With format s the column can be sorted alphabetically and still be in chronological order.
But ok :-)
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: Tony Redmondmailto:notifications@github.com Sent: 8. september 2020 13:31 To: 12Knocksinna/Office365itprosmailto:Office365itpros@noreply.github.com Cc: Rene Hansenmailto:HansenRene@outlook.com; Authormailto:author@noreply.github.com Subject: Re: [12Knocksinna/Office365itpros] TeamsGroupsActivityReport.ps1 -> Date format to 's' (#14)
I think that's a choice that a tenant can make. If you want to use format s, go ahead and create your own version of the script.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2F12Knocksinna%2FOffice365itpros%2Fissues%2F14%23issuecomment-688807658&data=02%7C01%7C%7C1293f8e34b9c4e24a88408d853eab0a6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637351614728869477&sdata=mMmQTG5vFao1MvSEu50yEjP%2BEjkeTF0N%2FZ7uTyiJhLM%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE5MLTSXYTG2VQCBIXQBYSLSEYIX7ANCNFSM4QXS4XYQ&data=02%7C01%7C%7C1293f8e34b9c4e24a88408d853eab0a6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637351614728869477&sdata=T9v1DyZUEbO9sh5ShUExGvwiHhXa47Om%2F8Gyqzpk4HU%3D&reserved=0.
There's nothing to stop you sorting the dates as dates. For example:
$Report | Sort {$_.LastConversation -as [DateTime]} -Descending |ft Groupname, lastconversation
Hi,
Please consider using "-format s" in all date outputs. Doing so will make the relevant columns instantly sortable even if some rows contain No items found/No Chats