In short - you cannot.
For one, your problem is that whatever format Windows saves something in as a date is usually not the format a database expects stuff of a DATETIME format to be in.
For another, most of the dates/times the inventory scanner sends are in CTIME format (numbers of seconds since Jan 1st 1970, in short) - which again is different to what Windows saves things by default.
Generally, because of this, the only "viable" way to read custom data from registry and put it into the database "peacefully" is as custom strings - regardless of what it's "real" datatype may be.
Welcome to the "wonderful" world of data translation :).
What exactly is it you're trying to do - why does a string not work for you in this particular case? Background helps - as does what you're actually trying to acheive.
Hope this helps.
LANDesk EMEA Technical Lead.
I had a feeling that would be the answer. I am able to use the data as a string it just involves me exporting the inventory to a csv file and then importing it into Excel where I can change the data type and sort oldest to newest. Not really a big deal just more time consuming. Thanks for the help!
Just for anyone that may come accross this in a search:
I was eventually able to achieve the custom date field by doing some data modeling and changing the way our software writes to the registry. It took some testing, but I finally got the modeling and the data just how I wanted it. We also were able to go back and change the existing dates to the cdate format using a vbscript. It has allowed us to create queries based on the date.
The document used to model data is here: