All Questions
9 questions
-2
votes
1
answer
63
views
Why is it selecting date from another month that requested one? [closed]
I have a table that store time begin and time end of some events. I want to search in this table all even that were occuring during specific day.
Here is example data:
Id
Date begin
Date End
Name
1
...
0
votes
1
answer
93
views
Select entries with today and tomorrows date
I am using MariaBD and am trying to filter entries with todays date and tomorrows date.
I have managed to filter todays date using
SELECT *,
DateTime AS Time
FROM table
where status = '...
0
votes
1
answer
182
views
How to insert '1001-01-01 00:00:00' into MariaDB when altering a table?
I created a table in HeidiSQL:
CREATE TABLE `publish_dt` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`TS` DATETIME NULL DEFAULT NULL,
`Text` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci'...
0
votes
1
answer
1k
views
Disable mysql_tzinfo_to_sql during MariaDB/MySQL installation
MariaDB run in docker container hangs during initial startup while mysql_tzinfo_to_sql running because of the issue.
I've disabled mysql_tzinfo_to_sql by setting MYSQL_INITDB_SKIP_TZINFO env. var to ...
0
votes
3
answers
1k
views
Select youngest record
I have a MariaDB table "mdata" with the following schema:
+-----+-----------+---------------------+------+
| id | room | date | temp |
+------+-----------+---------------------...
2
votes
1
answer
470
views
How to store YMD, HM but not S Seconds in mariaDB/MySQL?
I was trying to make a column that stores the showtime of movies.
Since it is more meaningful to have showtimes in the unit of minutes, can I have a date type that has only years to minutes (eg. ...
2
votes
1
answer
2k
views
MariaDB 10.2.7 doesn't accept trailing Z for DATETIME timezone when inserting, but earlier version does
It works with ADDTIME, but not when inserting.
MariaDB [(none)]> SELECT ADDTIME('2016-10-12T23:00:00Z', '1');
+--------------------------------------+
| ADDTIME('2016-10-12T23:00:00Z', '1') |
+----...
1
vote
1
answer
1k
views
Querying dates with different timezones at db and application level
There is a created_at column of datetime type in the order table. In my application I'm storing dates to the db as datetime in UTC. When I bring them back from the db I'm presenting/formating them to ...
8
votes
3
answers
7k
views
How can I improve my SQL statement with weekly results with week starting on Thursday or any other day of the week?
I am a total newb, and I couldn't find a good way to do this anywhere. I have a database table that contains statistics that are recorded at various time throughout the week. The reporting week ...