|
-
Oct 15th, 2010, 12:25 PM
#1
Thread Starter
New Member
Bytes To Date
Hello
I needed to save a date to a smart card, so first I had to serialize my 8 byte Date variable to a byte array. I did this with kernel32 copymemory.
Actually I'm saving just the four last bytes because I dont need the time part.
My problem is that I cant retrieve the date from the bytes. I tried the following code which results to overflow:
m_expirationDate = CDate((m_rawBytes(0) * 16777216) + (m_rawBytes(1) * 65536) + (m_rawBytes(2) * 256) + m_rawBytes(3))
So how can this be done?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|