Answer the question
In order to leave comments, you need to log in
How to select a time period from the base?
There are 2 columns with dates in the database: date
(in which the date is in the format 09.04.2016
) and date_utc
(in which the date is in the format 1460193011379
)
You need to select records from this database for a certain period, which is specified by two dates, for example, 01.04.2016
and 15.04.2016
How to write such a query?
Answer the question
In order to leave comments, you need to log in
SELECT * FROM table_name WHERE date BEETWEN '2016-04-01' AND '2016-04-15'
or timestamp
SELECT * FROM table_name WHERE date_utc BEETWEN UNIX_TIMESTAMP('2016-04-01') AND UNIX_TIMESTAMP('2016-04- fifteen')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question