Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell to group by date time

$
0
0

I wrote below powershell script:

 Get-MessageTrackingLog -Start $start -End $end  -ResultSize unlimited -EventId Send | select $_.Timestamp.ToString("MM/dd/yyyy"), $_.ReturnPath 

It give me error 

You cannot call a method on a null-valued expression.
At line:1 char:1
+  select $_.Timestamp.ToString("MM/dd/yyyy"), $_.ReturnPath -First 4

How can I convert the timestamp to MM/dd/yyyy so I can group it by date? thanks



Alan


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>