Finding Secret Date-Time Methods

However, to use developer-centric date-time methods, you will need to know them first. Here is how:

Get-Date | Get-Member -memberType *Method

This will give you a list of all methods provided by date-time objects. To add six years to today's date, you can use this:

(Get-Date).AddYears(6)

Twitter This Tip! ReTweet this Tip!


Posted Jul 12 2010, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.