Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


5 posts

Wannabe Geek


Topic # 228872 26-Jan-2018 14:17
Send private message

Hi

 

I'm trying to modify hex code in a file that shows a date in a program.
I cannot figure out the code:

 

a5 c6 = 2017/04/05

 

3e c8 = 2017/08/14

 

7b c9 = 2017/11/31

 

 

 

What would be the hex code to display 2017/12/14

 

Any help greatly appreciated


Filter this topic showing only the reply marked as answer Create new topic
Glurp
7561 posts

Uber Geek
+1 received by user: 3536

Subscriber

  Reply # 1947204 26-Jan-2018 15:11
Send private message

Your dates don't make sense. Assuming the last figure is the day, and the one before is the month, there are not 31 days in November so the date is impossible. It doesn't work the other way either, since there are not 14 months.

 

 





I reject your reality and substitute my own. - Adam Savage
 




5 posts

Wannabe Geek


  Reply # 1947216 26-Jan-2018 15:49
Send private message

Correct the date format is indeed YYYY/MM/DD

The 7b c9 was the result of me changing the code and the software displaying 2017/11/31

7a c9 would indeed show 2017/11/30

1467 posts

Uber Geek
+1 received by user: 178


  Reply # 1947218 26-Jan-2018 15:52
Send private message

Can you post the results of some sequential dates eg

 

2017/04/01

 

2017/04/02

 

2017/04/03

 

etc


1430 posts

Uber Geek
+1 received by user: 150




5 posts

Wannabe Geek


  Reply # 1947230 26-Jan-2018 16:13
Send private message

MurrayM

Ive had a read on a few posts from that google search but unfortunately it's way over my head! Anyway you could help out to give me the hex values to display 2017/12/14

434 posts

Ultimate Geek
+1 received by user: 68


  Reply # 1947233 26-Jan-2018 16:30
Send private message

Youre going to need to give us some more examples/data so we can reverse engineer the formula.

 

I'm going to guess that 5 bits store the day (32 values possible with 5 bits). 4 bits for the month.  You then have 7 bits left over for the year.  There'd be some epoc date/year for this too.  1950 maybe (you have up to 127 years you could store).  Could be 1970. Could be something else entirely.

 

We know its not storing days since an epoc date and using function to calculate the date from that.  Otherwise your single bit change would not have yielded an invalid date.  You could try incrementing a bit at a time and see what dates come out.  Probably find one or two more increments and either the month or the year would change (it may not be stored as day, month year.  Could be day, year, month or any combination of!)


Glurp
7561 posts

Uber Geek
+1 received by user: 3536

Subscriber

  Reply # 1947238 26-Jan-2018 16:39
Send private message

This link might help you.





I reject your reality and substitute my own. - Adam Savage
 


354 posts

Ultimate Geek
+1 received by user: 134

Subscriber

  Reply # 1947246 26-Jan-2018 17:00
Send private message

Is this some date the program displays when it runs, or are you trying to change some property the program uses?




5 posts

Wannabe Geek


  Reply # 1947251 26-Jan-2018 17:08
Send private message

This is a date the program displays when it runs

434 posts

Ultimate Geek
+1 received by user: 68


  Reply # 1948013 29-Jan-2018 08:04
2 people support this post
Send private message

Did a little bit more experimenting....

 

If you're running Windows open your calculater and set it to programming mode.  Then type in the dates in YYYYMMDD format.

 

The values you gave us earlier then show these "decimal" to hex values:

 

2017/04/05 => 20170405 = 0x133C6A5

 

2017/08/14 => 20170814 = 0x133C83E

 

2017/11/31 => 20171131 = 0x133C97B

 

2017/11/30 => 20171130 = 0x133C97A

 

 

 

Those are the 4 dates you gave us with corresponding hex values.  Observe that the last two bytes are month and day values, with the bytes simply swapped.  I think your programme is storing the values as 4 bytes you've only been giving us the last two.

 

I would then guess your required value for 2017/12/14 is CEC9

 

Here's the working...

 

2017/12/14 => 20171214 => 0x133C9CE.  Take the last two bytes (C9CE) and swap them to CEC9




5 posts

Wannabe Geek


  Reply # 1948031 29-Jan-2018 09:15
Send private message

nzkc:

 

Did a little bit more experimenting....

 

If you're running Windows open your calculater and set it to programming mode.  Then type in the dates in YYYYMMDD format.

 

The values you gave us earlier then show these "decimal" to hex values:

 

2017/04/05 => 20170405 = 0x133C6A5

 

2017/08/14 => 20170814 = 0x133C83E

 

2017/11/31 => 20171131 = 0x133C97B

 

2017/11/30 => 20171130 = 0x133C97A

 

 

 

Those are the 4 dates you gave us with corresponding hex values.  Observe that the last two bytes are month and day values, with the bytes simply swapped.  I think your programme is storing the values as 4 bytes you've only been giving us the last two.

 

I would then guess your required value for 2017/12/14 is CEC9

 

Here's the working...

 

2017/12/14 => 20171214 => 0x133C9CE.  Take the last two bytes (C9CE) and swap them to CEC9

 

 

 

 

You are bang on nzkc, it worked!! I remember experimenting with first byte values with C9 but must not have made it up to CE!

 

Thank you very much for taking the time to figure that out it will be a huge help both now and in the future, if you were around Wellington I would gladly buy you a beer, cheers!


Filter this topic showing only the reply marked as answer Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Microsoft Dynamics 365 Business Central launches
Posted 10-Jul-2018 10:40


Spark completes first milestone in voice platform upgrade
Posted 10-Jul-2018 09:36


Microsoft ices heated developers
Posted 6-Jul-2018 20:16


PB Technologies charged for its extended warranties and warned for bait advertising
Posted 3-Jul-2018 15:45


Almost 20,000 people claim credits from Spark
Posted 29-Jun-2018 10:40


Cove sells NZ's first insurance policy via chatbot
Posted 25-Jun-2018 10:04


N4L helping TAKA Trust bridge the digital divide for Lower Hutt students
Posted 18-Jun-2018 13:08


Winners Announced for 2018 CIO Awards
Posted 18-Jun-2018 13:03


Logitech Rally sets new standard for USB-connected video conference cameras
Posted 18-Jun-2018 09:27


Russell Stanners steps down as Vodafone NZ CEO
Posted 12-Jun-2018 09:13


Intergen recognised as 2018 Microsoft Country Partner of the Year for New Zealand
Posted 12-Jun-2018 08:00


Finalists Announced For Microsoft NZ Partner Awards
Posted 6-Jun-2018 15:12


Vocus Group and Vodafone announce joint venture to accelerate fibre innovation
Posted 5-Jun-2018 10:52


Kogan.com to launch Kogan Mobile in New Zealand
Posted 4-Jun-2018 14:34


Enable doubles fibre broadband speeds for its most popular wholesale service in Christchurch
Posted 2-Jun-2018 20:07



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.