Is it possible to store date and time inside an Integer?

370 Views Asked by At

I've created a logger that parse big .txt archives and convert each line of the file to an TObject composed of:

_date: TDateTime;

_ip: Integer;

_port: Word;

_bytes: TBytes;

Example of line:

01/12/2017 18:01:59.999 192.168.1.64:50000 0100021DC8
date ip:port bytes

As these .txt files are big, the number of generated objects are also enormous and so is the memory usage. Hence, in order to reduce memory usage I wonder if it is possible to store the _date field as an Integer instead of a TDateTime.

0

There are 0 best solutions below