This is simple, I know, but for some reason I am unable to do it.
The date gets imported from a csv file and subtracted from the current date to reveal an integer of days difference.
Powershell
$devices=Import-Csv.\Desktop\names.csv-Delimiter";"ForEach($itemin$devices){$name=$($item.name)[datetime]$date=$($item.date)[datetime]$today=Get-Date-format"dd.MM.yyyy"$newDate=[datetime]$today-$date}