Skip to main content

[Powershell]: Get-Date and commonly used date format

Get-Date and commonly used date format in powershell


PS C:\Users\Administrator> get-date
Thursday, June 25, 2015 9:42:24 AM

PS C:\Users\Administrator> $today = get-date
PS C:\Users\Administrator> echo $today

Thursday, June 25, 2015 9:43:21 AM

PS C:\Users\Administrator> $todayshort = get-date -format yyMMdd
PS C:\Users\Administrator> echo $todayshort
150625

PS C:\Users\Administrator> $todaylong = get-date -format yyyyMMdd
PS C:\Users\Administrator> echo $todaylong
20150625

PS C:\Users\Administrator>

Popular posts from this blog

HTML5: Complete Table Structure

Photo Credit: Gerald - pixabay.com   <table> <caption style="caption-side:bottom;" >Caption here</caption> <thead> <tr> <th>Header1</th> <th>Header2</th> ... </tr> </thead> <tbody> <tr> <td>Column1</td> <td>Column2</td> ... </tr> ... </tbody> <tfoot>Footer here</tfoot> </table>

Chrome: Common Keyboard Shortcuts

Get more productive by learning and using shortcuts in Chrome browser.