Go to content Go to navigation Go to search

Brokenwire.NET::Programming

Calculate your age
· Apr 3, 12:52 PM by Thijs Kroesbergen

Find out how old you are, in days... using PowerShell!

Ready? Here it comes:

([Datetime]::now - (new-object datetime(1981,09,26))).TotalDays

I'm currently 9686 days old. For a more dramatic effect you can replace the .TotalDays with .TotalHours (or minutes, seconds, milliseconds depending on the level of the effect you want to achieve).

Enjoy!

- Permalink -

Name
E-mail
http://
Message
  Textile Help