Answer the question
In order to leave comments, you need to log in
Time encoding in CSV file?
Good day! There was a difficulty with determining the type of encoding of the CSV file.
The file contains the exact time and price as I defined in the second column. It remains to find out what the time format is in the first and third columns. Also tell me how to import this format into the database through PHPadmin
Answer the question
In order to leave comments, you need to log in
The first column is unixtime (the number of seconds since January 1, 1970) and the second and third fields are floating point numbers.
A table in MySQL is created like this:
CREATE TABLE IF NOT EXISTS `shop` (
`id` int(11) NOT NULL,
`utime` int(11) NOT NULL,
`cost` float NOT NULL,
`wtf` float NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `shop`
ADD PRIMARY KEY (`id`);
ALTER TABLE `shop`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question