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

PowerTip: Use PowerShell to Create a Date String

$
0
0

Summary: Use Windows PowerShell to create a date string that has a month, day, and year.

Hey, Scripting Guy! Question How can I use Windows PowerShell to create a string that represents the date with the month, day, and year?

Hey, Scripting Guy! Answer Feed a pattern of ‘M/d/y’ to the ToString method from Get-Date:

PS C:\> (get-date).ToString('M/d/y')

10/28/13


Viewing all articles
Browse latest Browse all 3333

Trending Articles



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