Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Get-Date Question

$
0
0

This code works. when I run it I get the following output: Friday, May 13, 2016 6:55:16 AM
$dt1=Get-Date
$dt1


This code works. when I run it I get the following output written to my .txt file

05/13/2016 06:39:14


$dt1=Get-Date
$msg1="Here is todays date :: $dt1"
$msg1 | Out-File'c:\windows\acme\logs\DateTest.txt'

Why the difference in the date format?


Viewing all articles
Browse latest Browse all 6937

Trending Articles