Listing 3: Using DATETIMEOFFSET CREATE TABLE dbo.MyEmps ( MyEmpID HIERARCHYID, MyEmpLevel as MyEmpID.GetLevel(), MyEmpName VARCHAR(50) );