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

Running CockroachDB with Docker Compose and Minio, Part 2

Vista Vulnerability Report mentions Ubuntu 6.06 LTS

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