Questions tagged [sql-timestamp]

263 questions
0
votes
0 answers

I have to fetch the number of order requests arrived in last 2 hours in a sql server table: ORDER_REQUEST group by order origin id using data_jpa

I have to fetch the number of order requests arrived in last 2 hours in a sql server table: ORDER_REQUEST group by order origin id using data_jpa. I have tried various ways to achieve this using native query in data jpa but getting some…
0
votes
1 answer

how to add minutes to milliseconds in laravel query, and apply where condition?

I have a table named activities, where waiting_time is in minutes and start_time is in milliseconds. Name | event_start_waiting_time | event_time | running| 30 |1685944961000 | walking| 20 |…
developer
  • 3
  • 3
0
votes
0 answers

Timestamp(Time difference) with respect to current Time

I am using below piece of code to get the current date and time Whereas the time is displayed wrongly here, it shows less than 1 hour of current time. import java.sql.Timestamp Timestamp currTimeStamp = new Timestamp(System.currentTimeMillis());
0
votes
1 answer

.Net Core 7 with Postgres, Cannot update record with timestamp with time zone as primary key

I have the following situation: A postgresql 15 database with a table with a `timestamp with time zone' as part of the primary key. A C# .NET Core 7 application using: Microsoft.EntityFrameworkCore (7.0.4) Microsoft.EntityFrameworkCore.Design…
0
votes
1 answer

Why doesn't pd.read_sql read timestamps with no DST from my postgresql database?

I am trying to query data from my postgresql database using pd.read_sql. There are timestamptz columns, with a combination of dates which have DST and some which don't. The dates which have a DST offset are being read in correctly, however those…
Ivan
  • 11
  • 3
0
votes
1 answer

Azure Data Factory fails with UPSERT for every table with a TIMESTAMP column

my azure data factory throws the error "Cannot update a timestamp column" for every table with a TIMESTAMP column. ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed.…
Thomas L.
  • 524
  • 1
  • 5
  • 17
0
votes
0 answers

How to find difference between timestamps in rows that share the same workflow ID?

I have a table that is arranged as such, need to get the average time each step takes, and am using the updated_at column to do so. workflow_id step_name created_at updated_at 25 data_capture 2022-03-21 10:20:34 2022-03-21…
0
votes
1 answer

Postgresql how to query a time duration?

In my table case ,there are 2 tiemstamp fields looks like: check_in check_out "2021-09-07 07:25:00" "2021-09-08 17:10:00" "2020-09-25 06:02:00" "2020-09-27 15:20:00" "2020-10-26 05:42:00" "2020-10-29 13:05:00" How can I query…
William
  • 3,724
  • 9
  • 43
  • 76
0
votes
0 answers

Why is MySQL timestamp column not updated in replica?

I want to add a timestamp column to the replica table, so that when any updates get replicated from the source it gets updated. However, it does not seem to work on every table. Binary logs format is set to mixed. I tried to test this with a…
jjustas
  • 31
  • 1
  • 4
0
votes
0 answers

Unable to filter data with timestamp value using Mybatis and Oracle DB

I have a student_audit table where I am storing some audit information for the student. The table has existing data. ID | NAME | AUDIT_TIMESTAMP ___________________________ 1 | TEST | 22-JUN-22 07.23.59.515462000 AM The DDL for the table is as…
0
votes
1 answer

Mapping Error: oracle.sql.TIMESTAMP to java.util.Date while using Apache Camel

I am using Apache Camel framework of java in which I am fetching the data from oracle db with a column of type timestamp. When I am trying to map this to variable of type java.util.Date, it is throwing the following error mentioned. Caused by:…
0
votes
1 answer

sql query using timestamp returns nothing

I have a SQL table with a column create_date of type timestamp. I want to perform a query on the table that looks like this: select * from table where create_date = '2022-11-17 13:42:42.309' This should return the row with id=6. But when I…
nobody
  • 19
  • 2
0
votes
2 answers

Extracting timestamp from string big query standard sql

I have a column of store opening hours in STRING format where one column*row entry looks like this: Monday: 10:00 - 20:00, Tuesday: 10:00 - 20:00, Wednesday: 10:00 - 20:00, Thursday: 10:00 - 20:00, Friday: 10:00 - 20:00, Saturday: 10:00 - 20:00,…
mabiel
  • 95
  • 6
0
votes
2 answers

Timestamp Time is changed after fetching the record

I am facing issue while fetching record, The timestamp value is changed after fetching from DB. In my Oracle DB the column value is "19-OCT-22 02.15.00.000000000 AM" but after fetching it comes as "2022.10.19 00:15:00" @JsonFormat(shape =…
0
votes
0 answers

Fetch Java String from Timestamp column from oracle db

I have a very specific issue regarding one of my datasources. There was an issue with year 1582 in db2 which we solved by adding "setSqljAvoidTimeStampConversion" => this property makes reading all Timestamps as Strings and Db2 is indifferent -…
BAZERamm
  • 1
  • 1