Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Datum berechnen und in anderes Format umwandeln

$
0
0

moin

ich möchte gerne von einem Datum x Tage abziehen und bräuchte ein bestimmtes Format um es weiterzubearbeiten.

$datum = (Get-Date -Format "MM/dd/yyyy").AddDays(-1)
Method invocation failed because [System.String] does not contain a method named 'AddDays'.
At line:1 char:1+ $datum = (Get-Date -Format "MM/dd/yyyy").AddDays(-1)+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException+ FullyQualifiedErrorId : MethodNotFound



Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>