mikeydk
asked on
Compare dates
Hey
How do I: (compare)
If ("01-01-2018 18:32:51" -gt "01-12-2017") { write-host "Hello World"}
(24H)
Mike
Powershell
How do I: (compare)
If ("01-01-2018 18:32:51" -gt "01-12-2017") { write-host "Hello World"}
(24H)
Mike
Powershell
ASKER
Hey
Great - but how do I type cast the string - when using european format? (dd-MM-yyyy)
Great - but how do I type cast the string - when using european format? (dd-MM-yyyy)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not 100% sure what you are after but try this, it will convert the 'text' date/time values you have into real date/time values and compare them.
Open in new window