"Nicholas Paldino [.NET/C# MVP]" wrote...
I would use the BitConverter class, getting the bytes,
and then passing the bytes back, calling the ToInt64
method. Once you have that, you can pass the long to
the appropriate method on the DateTime class to convert
the long into a DateTime.
I don't think that would be necessary, or enough for that matter...
If the OP already have a .NET-client talking to the IBM mainframe, the
actual "transportation" of the ulong would be the least problem.
The ToDateTime in Convert that takes a long seems to be "not implemented
yet"...
And, the constructor in the DateTime struct that takes a long is supposed to
take the number of "ticks" (100-nanoseconds since 0001-01-01 12:00 AM),
which probably is *not* what an STCK looks like...
In one place I've seen an STCK defined as the number of milliseconds since
1900-01-01 something...
I've also seen another definition of STCK as the first 32 bits representing
the Date, while the latter 32 bits representing a fraction of a day, hence
the time part...
So, if you look up what the STCK really looks like on your IBM, and share
that with us, we could possibly come up with some simple way to convert it
to the correct DateTime.
just my 2c
// Bjorn A