Find day of the week using Powershell command

by Viper 29. January 2009 10:24

I was working on some automation script and somebody asked me whats the day of the week on a certain date. I was like lets see if i can do it without opening up calendar. So i decided to play around with get-date command in Powershell. And there it was, some fun with the command to try different things. Following are some commands that you can try yourself.

How to get day of week


get-date -format dddd

How to get day of week for any date


get-date -format dddd -Year 2010 -Month 2 -Day 28

Notice use of Year, Month and Date parameters. If you omit one of these parameters, then command will use today's component of that parameter.

Give your advice to big bosses and make money

Views: 859

Tags:

Powershell | Automation

Comments

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.5.1.7
Theme by Naveen Kohli

By Categories