Only Parse Hour and Minute

Hi all, I’m trying to Parse a String to DateTime, but i only need the Hours and Minutes of the String. Here is what i tried:

([datetime]::ParseExact(“12:00″,”HH:mm”,[Globalization.CultureInfo]::InvariantCulture)

And the Result is: “16.10.2018 12:00:00”

How can i only get the Hour and Minutes? I already tried -Filter, but this doesn’t work.

submitted by /u/TDBCico
[link] [comments]

Leave a Reply