Using VB to Decode Dates <=> Longs
The attached text file is a simple way of using VB to convert a long to a date (either a UTC formatted long value, or a normal baan date long value). It also converts a date to a long (either the UTC long version of the given date, or a normal baan date converted to a long).
If the UTC date or long is used, the code will automatically convert the GMT date/time and apply the offset of the local PC. Thus, all UTC date/times that are converted, are done in the regional date/time of the PC.
These functions are very handy, when using OLE connections, so if you don't have your own date/time conversion functions. Also, when using the Baan 5 debugger, and clicking on a date value, only to get a meaningless long returned....
Hope this helps...