Skip to content

Instantly share code, notes, and snippets.

@vexx32
Created November 21, 2019 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vexx32/fd286d7fa5ef43a815183d56ceb04c69 to your computer and use it in GitHub Desktop.
Save vexx32/fd286d7fa5ef43a815183d56ceb04c69 to your computer and use it in GitHub Desktop.
$date = (Get-Date).AddDays(-31)
Import-Csv -Path "C:\temp\file.csv" |
Where-Object {
[string]::IsNullOrWhitespace($_.LastDayOfWork) -or
[datetime]::ParseExact($_.LastDayOfWork, "MM/dd/yyyy", [cultureinfo]::CurrentCulture) -lt $date
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment