I'm reading in my csv file and before loading data to SQL want to check a input data for a value and if contains load a Null to SQL field. It appears to skip check and just fail load process saying cant convert "?" to datetime which
I'm trying to avoid in check.
THanks.
if ($_.AD_MOD_DATE -ne "?") {$valid = $true} if ($valid) { $date = Get-Date $_.AD_MOD_DATE $Row.col18 = $date } else { $Row.col18 = null }