This query can help you to get the expiration date of trial version:
SELECT create_date AS 'SQL Server Install Date', DATEADD(DD, 180, create_date) AS 'SQL Server Expiry Date' FROM sys.server_principals WHERE name = 'NT AUTHORITY\SYSTEM'
nt authority/system account is created on the time of installation so you can rely on this as reference point