Skip to main content

All Questions

Tagged with
-1 votes
1 answer
67 views

from_unixtime still displaying 19 hours past expected time

I currently have some cleaned data with new columns and formatted correctly, however the clause regarding from_unixtime is stumping me. I have tried the following: from_unixtime(`time@timestamp`, '%H:%...
Joey's user avatar
  • 1
0 votes
1 answer
293 views

Modifying the query to solve the Problem 2038 in MariaDB

I have a SQL query: update party set left_time=(next_dose-dose)/power,takeoff=from_unixtime(unix_timestamp()+left_time); How can I modify it without using unix time to get the dates further than 2038-...
Michael's user avatar
  • 5,257
0 votes
1 answer
38 views

I need a where clause that specifies a specific a date cutoff, but does not prevent other data (MYSQL)

I have a SQL query where I am trying to pull trucks that have come to my shop. In this query I have: Truck_ID, Recieved_Date, Released_Date. Here's a sample data set ID Rec_Date Rel_Date 1 1/1/23 2 ...
SuspectT3's user avatar
0 votes
1 answer
87 views

Checking if UNIXTIMESTAMP is within the last 60 seconds for all users to count users online

So, I'm trying to properly check UNIX timestamp to count users online. The way I am trying to do so is if the user is active on a page it updates their user data with the current UNIX Timestamp. The I ...
Tim Slim's user avatar
1 vote
1 answer
172 views

SQL | Sum up data of each day of the last 7 days with unix timestamp

I want to build a Chart that shows the total daily orders from the last 7 days. SELECT `timestamp` AS date, SUM(`total`) AS total_sales FROM `orders` WHERE from_unixtime(`timestamp`) > date_sub(...
Cedzy's user avatar
  • 46
0 votes
1 answer
88 views

Wrong timestamp conversion in mysql database [duplicate]

I'm trying to group timestamps into slots of 15 Minutes. I'm using the following sql statement to retrieve time data from my mysql database. select floor(unix_timestamp(timestamp)/(15*60)) as "...
user avatar
0 votes
0 answers
48 views

how best to compare diff day hour minutes from string

i have field diff_clock and diff_schedule i have set the diff_clock with these sql ( trigger ) CONCAT( FLOOR(TIMESTAMPDIFF(SECOND, NEW.clock_in_time, NEW.clock_out_time) / 3600 / 24), ' ...
Yogi Arif Widodo's user avatar
0 votes
0 answers
60 views

Mysql WHERE ... ORDER BY taking too long in large database

I have a large database. There are 22 million lines for now, but there will be billions of lines in the future. I have attached example lines where timestamp is in milliseconds. What I want to do is ...
Tufan YAVAŞ's user avatar
0 votes
1 answer
155 views

How can I get 7 days before last 7 days using UNIX_TIMESTAMP?

I use the code below to return results from a mySQL field called registered_at so I can get the users that registered on the site the last 7 days and it works fine: andWhere('registered_at > ...
Designer's user avatar
  • 895
1 vote
1 answer
993 views

Filter per year with a timestamp on SQL

I'm having some trouble with filtering for a specific year with a timestamp. This is the code I have to convert the timestamp into the yyyy-mm-dd format: SELECT rating, timestamp, FROM_UNIXTIME(...
rakh's user avatar
  • 53
0 votes
0 answers
786 views

Dispatch job with milliseconds delay

TL;DR Can't dispatch jobs in Laravel with milliseconds delay, since available_at column is in unix timestamp format and doesn't support milliseconds. I use database driver for jobs and wanted to ...
Skywarth's user avatar
  • 713
0 votes
2 answers
1k views

How to convert unix epoch format date to UTC in SQL query?

I am having this format of datetime 1610382439.I am looking sql query to convert it to UTC time.
Saswat Ray's user avatar
-1 votes
1 answer
76 views

passing parameter in Mysql Stored proc within unix script

I need to pass a parameter in mysql stored proc(RDS aurora). I am calling stored proc from unix script. somehow its not working. Please suggest where it went wrong? below unix script. This is calling ...
Deepak nigam's user avatar
0 votes
1 answer
515 views

Converting timestamp from one column of an SQL table to dates in another column of the same table

I'd like to convert unix timestamps from one column of an existing sql table to dates in another column of the same table. Something like this: take the values of column TIMESTAMP from every raw and ...
wanderlusted's user avatar
0 votes
1 answer
424 views

How to fetch last 24 hour record using unix timestamps

I have following two tables in MySQL and I want to get name and count of reviews. How can I do this? Here is my table un_users: id wallet_address username 1 xxxxxxxxxxxxxx ...
amit's user avatar
  • 1,199

15 30 50 per page
1
2 3 4 5
24