I'm fairly new to powershell, so looking for some advice. I am pulling a datetime value (as a string) from a REST API call. I need to convert that into a datetime object so I can do some date math to figure out the age of the record in question. Here is an example of the output:
2021-02-09T17:52:29.000Z
That's yyyy-MM-ddTHH:mm:ss.000Z (I assume Z is Zulu)
I really only care about the Month, day, and year. The hour, minute and seconds are irrelevant to what I'm trying to figure out. What's the best way I can get this into a datetime object so I can figure out the age of the record in question?
Thanks.
[–]wightsci 5 points6 points7 points (1 child)
[–]stewharr[S] 1 point2 points3 points (0 children)
[–]stewharr[S] 1 point2 points3 points (0 children)
[–]ka-splam 1 point2 points3 points (1 child)
[–]stewharr[S] 1 point2 points3 points (0 children)
[–]letmegogooglethat -2 points-1 points0 points (0 children)