# powrshell datetime object

**URL:** <https://forums.powershell.org/t/powrshell-datetime-object/666>\
**Category:** PowerShell Help\
**Created:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/powrshell-datetime-object/666 "2011-12-31T18:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![archives](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@archives](https://forums.powershell.org/u/archives)\
**Post date:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/powrshell-datetime-object/666/1 "2011-12-31T18:30:00Z")

</div>

by binary01 at 2013-03-01 07:46:25

> hello:  
> i try to get the propertes and the methods of datetime, so i try a first command [datetime] | get-member, the second command i tried is  
> [datetime] :: with tab completion, and the result was differrent for example the method FromFileTime() is listed only with the second command not with the first, so what is the difference…?  
> thank you in advance

by mjolinor at 2013-03-01 07:55:40

> There are 2 kinds of methods and properties, instance and static.  
> The :: notation is used to get static methods and properties, and the dot operator is used for instance methods and properties.  
> Get-Member by default only returns instance properties and methods. Use the -Static switch to return the static properties and methods.  
>   
> `[datatime] | Get-Member -Static`

by nohandle at 2013-03-01 13:23:23

> or -force to get all. 🙂

by mjolinor at 2013-03-01 13:32:36

> Actually, you still have to specify -Static with -Force to see the static methods and properties.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:57pm UTC](https://forums.powershell.org/t/powrshell-datetime-object/666/2 "2024-05-16T20:57:55Z")

</div>

Closed on May 16, 2024, 8:57pm UTC


