PowerShell: Comparing dates -


i querying data source dates. depending on item searching for, may have more date associated it.

get-date ($output | select-object -expandproperty "date") 

an example of output looks like:

monday, april 08, 2013 12:00:00 friday, april 08, 2011 12:00:00 

i compare these dates , return 1 set further out future.

as get-date returns datetime object able compare them directly. example:

(get-date 2010-01-02) -lt (get-date 2010-01-01) 

will return false.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -