converting a hex timestamp to a readable date/time

F

Faye

I have a field containing a timestamp (0x0000000021178DA5) that I would like
to convert a readable date/time, is there a way to do that?

thanks,
Faye
 
M

Marshall Barton

Faye said:
I have a field containing a timestamp (0x0000000021178DA5) that I would like
to convert a readable date/time, is there a way to do that?

You can use CLng("&H" & Mid(thefield, 3)) to convert the
field from hex to a long integer.

If that represents a time interval in some units of time,
then you can use the DateAdd function to add it to the
unit's base date. For example, if that were a unix date,
DateAdd("s", &H0000000021178DA5, #1/1/70#)
would return the date: 8/5/1987 7:55:17 PM

If that's not the kind of thing you nec value represents,
then you should explain it in more detail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top