get day of week from the past date (Powershell)

This script allows you to quickly get a day of week from a provided date in the past. Quickly get the DOB date to test it :).

(get-date "1/1/2008").DayOfWeek

p.s. works just as well for future dates:

PS C:\Powershell> (get-date "01/20/2009").DayOfWeek

Quick, what is the significance of this date?

Taken from "Manning Windows Powershell in Action"


Popular posts from this blog

VirtualBox options to start VM in Normal, Detached and Headless Modes

Digsby is bringing out a Linux and Mac client very soon

Executing Python and Python3 scripts in Oozie workflows