Do you get a series of bytes (like a byte[]) or do you get a text string of "ECCEE4554" ?
Now - "since 1970" is a fairly broad term...so you need to figure out the exact time to run from...so assuming we can figure this out:
Convert the hex to decimal...or not (if not, just add the hex notification so that the compiler knows how to convert it).
What about this? I'm assuming by "1970" you meant since 1/1/1970 12:00:00 AM otherwise just change the start date accordingly. Use the &H (VB) or 0x (C#) flag to notify the compiler that this value is hexadecimal. Obviously you would replace the literal that I used in my demo with a variable containing the literal value.
VB
- Dim StartDate As DateTime = Convert.ToDateTime("1/1/1970 12:00:00 AM")
-
Dim OutputDate As DateTime = StartDate.AddMilliseconds(&HECCEE4554)
C#
- System.DateTime StartDate = Convert.ToDateTime("1/1/1970 12:00:00 AM");
-
DateTime OutputDate = StartDate.AddMilliseconds(&HECCEE4554);
Hmm...just tested that with the original Hex string (&hEC5461887011) and it crashes because the number is too large...are we sure this isn't a byte array? Or in some other measure than milliseconds? If I add ticks, but I don't suppose that is correct...the resulting date doesn't seem high enough.