Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-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 ...
Elikill58's user avatar
  • 181
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 = '...
PaulMcF87's user avatar
  • 177
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'...
Serge Rogatch's user avatar
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 ...
rokpoto.com's user avatar
0 votes
3 answers
1k views

Select youngest record

I have a MariaDB table "mdata" with the following schema: +-----+-----------+---------------------+------+ | id | room | date | temp | +------+-----------+---------------------...
thelaakes's user avatar
2 votes
1 answer
471 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. ...
jackxujh's user avatar
  • 135
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') | +----...
Sarke's user avatar
  • 123
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 ...
user avatar
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 ...
James Lee Vann's user avatar