Powershell, compare data table object to date time variable : I am trying to compare the current date/time to a date time located in the first row of a data table filled from an sql query.

$datatable | out-host

Shows this...

LastRunDate
————————-
3/28/2019 1:22:01 PM

I need to compare that one cell to the current date and time to see when the last time the data source was updated.  I just can’t fogure out how to extract that cell and convert it to a date time variable .  Any suggestions?  Thanks!

Jon

