Try like this.
Note that the UpgradeDate will only be correct when the upgrade you envision was the last upgrade.
If that is not the case, then an alternative is to look at the Task and Event, or eventually the esxupdate.log
Get-VMHost |
Select Name,
@{N='InstallationDate';E={
$script:esxcli = Get-EsxCli -VMHost $_ -V2
$epoch = $script:esxcli.system.uuid.get.Invoke().Split('-')[0]
[timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds([int]"0x$($epoch)"))}},
@{N='UpgradeDate';E={
$script:esxcli.software.vib.list.Invoke() | where{$_.Name -eq 'esx-base'} | select -ExpandProperty InstallDate
}}