Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Convert String into DateTime Object

$
0
0

Summary: Use Windows PowerShell to convert a string into a DateTime object.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily create a System.DateTime object from a string?

Hey, Scripting Guy! Answer Use the [DateTime] type accelerator to convert the string, for example:

[datetime]"1/2/14"


Viewing all articles
Browse latest Browse all 3333

Trending Articles