How to convert ° to a readable date?

I am converting a database created in 80 and it seems that the date for some tables is stored as characters. There are 2 columns of data. The first column has data formatted as follows:

°& C2 024 

The second column is a simple text description:

 Description of some stuff 

Data is imported into the table view. C2 defines the table heading, 024 defines the row and ° and defines the day on which the table data is drawn. Example:

  Date: 2/21/2007 C1 C2 C3 C4 000 003 006 009 012 015 018 021 024 Description of some stu... 027 

I tried converting dates to hexadecimal and comparing a hexadecimal card with a no-luck character.

I tried using the unix date, following the instructions from http://smallbusiness.chron.com/convert-date-hexadecimal-56217.html without success.

Examples of values ​​and known dates:

 °& - 2/21/2007 ¬& - 2/7/2007 +( - 2/6/2007 ª& - 2/5/2007 
+6
source share
2 answers

Your question cannot be answered as asked. It is imperative to know the numbers in the date column, because that is certainly what they are. They are not strings in the encoding you use 30 years later.

You mentioned the sequence °& . If you are using Linux with ISO 8859-1 encoding, this character is a power of B0. If you are using a CP850 encoded Windows console, this is F8. We also do not know the endianism of data that could explain the mystery +( .

So, the first order of business is to find out the actual bytes in the column. Print them in hexadecimal format and convert them to decimal, interpreted as large and small-finite. Then, perhaps, you will see a template that allows you to set the era. From there, all this is fresh powder and the blue sky.

+1
source

This page says that ASCII codes are used to store the number of days from (1) to January 1, 1900. This is similar to the serial date technology used by Lotus 1-2-3, MS Excel and other software. http://cs.pervasive.com/forums/p/11233/38076.aspx

0
source

Source: https://habr.com/ru/post/986672/


All Articles