Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Pipe String to Get-Date

$
0
0

Summary: Pipe a string to the Windows PowerShell Get-Date cmdlet to convert it to a DateTime object.

Hey, Scripting Guy! Question How can I use Windows PowerShell to convert a date that is in a string format to a DateTime object?

Hey, Scripting Guy! Answer Create a pipeline, for example:

"11/14/2015" | get-date 


Viewing all articles
Browse latest Browse all 3333

Trending Articles



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