Author Posts

May 1, 2017 at 8:17 pm

5/1/2017 7:00:00 AM

I would like to get just 7:00:00 AM data from the above system.datetime value

Is there way to get it instead of converting the system.datetime to string and splitting the string

May 1, 2017 at 8:56 pm

You need to use the -Format switch to get parts of a date\time. See:

Get-Date -Date "5/1/2017 7:00:00 AM" -Format "T"