Questions tagged [sql-timestamp]
263 questions
0
votes
2 answers
SQL Server max timestamp per day for specific column from joined table
I'm really new to SQL and have essentially googled my way to this point, I'm pretty stuck now.. so I hope someone out there can help!
Goal: get the rows with the most recent timestamp per day for every trip_id in MS SQL Server (there are multiple…

Brad T
- 13
- 1
- 4
0
votes
1 answer
MySQL table creation convention
How do I create a table in my schema using the current date or timestamp as the naming convention?
CREATE Table CURRENT_DATE|TIMESTAMP;
REPLACE CURRENT_DATE|TIMESTAMP
SELECT *
FROM other.othertable;

Reese
- 21
- 4
0
votes
2 answers
Get all table's row updated after a specific time
Background:
I have an oracle table, the table doesn't have any specific column as timestamp while table creation script. This table can have millions of rows.
Example:
Employee {Emp_No, Name, Manager,Division, Role, Region}
My quest: If any…

Rohan K
- 177
- 1
- 3
- 21
0
votes
3 answers
Proper usage of Date and Timestamp Oracle datatypes
finding it difficult to format Date and Timestamp in my script.
v_date1 Date;
v_date2 timestamp;
Assume I have a created_date field and value is '31-03-2017 18:02:05'
select c1 into v_date1 from table_a;
Gives me - '31-03-2017'
select c1 into…

Ramaraju.d
- 1,301
- 6
- 26
- 46
0
votes
0 answers
sql query giving incomplete answer
Need help on oracle sql for getting a subset of 'Dropped' data from 1500 hours yesterday to 2400 hours today.
The superset will be 'intransit' from 1500 hours yesterday to 1500 hours today
my query is only giving 'dropped' from 1500 hours yesterday…

Sumit Jain
- 367
- 1
- 7
0
votes
1 answer
How to alter table in Postgres to show Timestamp with Time Zone abbreviation (2004-10-19 10:23:54 EST)
I want to alter my table row from 2011-06-30 05:59:59+00 format into 2011-06-30 05:59:59 CDT format

Avnee
- 5
- 3
0
votes
1 answer
MonetDB is timestamp guaranteed to be unique
The temporal definition in MonetDB says that:
"TIMESTAMP [ '(' posint ')' ] date concatenated with unique time, precision"
That this mean that if two rows are created with a DEFAULT TIMESTAMP that these timestamps are guaranteed to be unique, even…

kenwri
- 1
0
votes
0 answers
generate timestamp without time vs. mid-night timestamp
I'm going to generate timestamp from a date
set @inputDate = '2016-04-21';
select timestamp(@inputDate) from dual;
the result is:
2016-04-21 00:00:00
like midnight time. How can I know that the input file was generated without time or it's…
0
votes
0 answers
Getting error when converting timestamp column to time
I am getting the following error message, when trying to convert timestamp column to time.
Error message:
SQL Error [500310] [0A000]: [Amazon](500310) Invalid operation: Specified types or functions (one per INFO message) not supported on Redshift…

RustyShackleford
- 3,462
- 9
- 40
- 81
0
votes
2 answers
What is the internal representation of timestamp values in MySQL
I have a .dat file that represents a Table in a database and has a particular column for timestamp values. Now the values are stored in the following way: -
978302039
I'm required to copy all the elements into another table, but I'm not sure if the…

Auro
- 1,578
- 3
- 31
- 62
0
votes
1 answer
How to get hours from timestamp for a specific value in MySQL?
EDIT :Different example : i have a car i check every minute the cars speed. Now i want to know for how many hours the car was driving at a specific speed.
i have timestamp and x =…

Khan
- 1,418
- 1
- 25
- 49
0
votes
0 answers
Getting the Date('YYYY-MM-DD') from a text representation of a timestamp in milliseconds in Oracle
We have a DB that is storing the timestamp (in milliseconds since Unix Epoch, Jan 1st 1970) in a text column in a Oracle DB. We would like to get a Date('YYYY-MM-DD') from that
I tried the following but it doesn't seem to work:
…

Saqib Ali
- 3,953
- 10
- 55
- 100
0
votes
1 answer
MySQL Getting the return of a substraction
We are trying to get the length of a physical exercise by using the timestamps on our sensor data.
We currently have the following query:
SELECT UNIX_TIMESTAMP(
SELECT HAAS2.trainingsdata.timestamp
FROM HAAS2.trainingdata
WHERE…

Milan van Dijck
- 131
- 9
0
votes
1 answer
Trying to convert hh:mi:ss to hhmiss in postgresql
So I've been trying to convert the time in one of the columns in my table. The time column in the table has the format hh:mi:ss but I need it to be in the format hhmiss without the colons; so far I've tried this:
SELECT
time_utc
FROM
…

user665997
- 313
- 1
- 4
- 18
0
votes
1 answer
LIKE operator on timestamp column, SQL Server
How can I use LIKE operator on a column having timestamp (rowversion) data type ?
Below are the queries I tried but no luck.
-- no data is fetched using this SQL
SELECT * FROM TAB
WHERE tRowVersion LIKE '0x000000000000E05%'
-- incorrect syntax near…

Aditya
- 2,299
- 5
- 32
- 54