You haven't specified the ESXi version you are using.
You can try below Using PowerCLI.
From this blog(Find ESXi Installation Date with PowerCLI | EnterpriseAdmins.org) I got the below script and working fine on ESXi 5.5
# Find ESXi install date: http://vcdx56.com/2016/01/05/find-esxi-installation-date/
# Convert HEX to DEC: http://michaelflanakin.com/Weblog/tabid/142/articleType/ArticleView/articleId/1073/Converting-ToFrom-Hex-with-PowerShell.aspx
# Convert epoch to date: http://stackoverflow.com/questions/10781697/convert-unix-time-with-powershell
Get-VMHost |Sort Name |%{
$thisUUID=(Get-EsxCli -VMHost $_.name).system.uuid.get()
$decDate=[Convert]::ToInt32($thisUUID.Split("-")[0],16)
$installDate=[timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds($decDate))
[pscustomobject][ordered]@{
Name="$($_.name)"
InstallDate=$installDate
}# end custom object
}# end host loop
If you are having ESXi 6.5 then you can go through this link: http://www.virtuallyghetto.com/2016/10/super-easy-way-of-getting-esxi-installation-date-in-vsphere-6-5.html