Hello BronTamulis
You can use define the filename append format as "C:\SQL\gppayments{0}.csv" -f (get-date -format "yyyyMMddHHmmss")
For instance:
$FileName = "C:\SQL\gppayments{0}.csv" -f (get-date -format "yyyyMMddHHmmss")
$FileName
Invoke-sqlcmd -ServerInstance DESKTOP-HG7ATKK\GP2018 -Database FARGO -query "Select * from IV00101" `
| Export-Csv -Delimiter "|" -Path $FileName -NoTypeInformation
another way should be using Get-Date as next
$SavePath = "C:\SQL"
$SavePathName = Join-Path -Path $LogPath -ChildPath "gppayments$(Get-Date -Format 'MM-dd-yyyy')"
--If the reply is helpful, please Upvote and Accept as answer--