I was a bit playing with powershell. I wanted to know the week of month, day of weeks, and other gems. It is chockingly easy !
Unix Timestamp :
PS> get-date -uformat %s
To get the day of week as number, you can chose between
get-date -uformat %u
What does uformat stand for ? Unix Format ! This is probably why powershell is so good, they integrated all unix and .net goodies in one tool 🙂
Ok, one more, get the week of month :
PS> (Get-WmiObject Win32_LocalTime).weekinmonth