Where you have OSINSTALLEDDATE by add dataclass you should have a guid. Kinda like this
'===================================================================================================================
' On Error Resume Next
'**** Global Variables************************
const HKEY_LOCAL_MACHINE = &H80000002
const REG_SZ = 1
const REG_EXPAND_SZ = 2
const REG_BINARY = 3
const REG_DWORD = 4
const REG_MULTI_SZ = 7
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\MICROSOFT\INTERNET EXPLORER"
strValueName="version"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
'wscript.echo strValue
version=strValue
'===================================================================================================================
'Create instance of Altiris NSE component
dim nse
set nse = WScript.CreateObject ("Altiris.AeXNSEvent")
' Set the header data of the NSE
' Please don't modify this GUID
nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
nse.Priority = 1
'Create Inventory data block. Here assumption is that the data class with below guid is already configured on server
dim objDCInstance
set objDCInstance = nse.AddDataClass ("{0944666a-58b0-461c-9d7e-fb8fab322e90}")
dim objDataClass
set objDataClass = nse.AddDataBlock (objDCInstance)
'Add a new row
dim objDataRow
set objDataRow = objDataClass.AddRow
'Set columns
objDataRow.SetField 0,Version
nse.SendQueued
Something to remember though is that you need to go settings>all settings > discovery and inventory>Inventory solution> Manage custom data classes and create it there. I tried to do it other ways and it always acted up when my test machine turned in the NSE. When I created it there it worked fine.
Also I use this to put the date in a more readable format for my machines because if I used the function you have for date I ran into an issue on machines in other countries that set the date into different formats. It was returning it to my server and giving me a lot of different formats which made it useless for inventory.
Function getmydat(strDate)
getmydat = Left(strDate, 4) & "-" & MID(strdate,5,2) & "-" & MID(strdate,7,2)
End function