Questions tagged [sql-timestamp]

263 questions
1
vote
0 answers

impala sliding window

I would like to run a sliding window function in impala that finds the maximum price based on 5 minutes interval in other words i want to compare the price of my current row with all rows in the last 5 minutes and write the maximum price Analytical…
1
vote
1 answer

how to get number of days between two java.sql.timestamp field in scala

I am having two fields of java.sql.timestamp type in my dataframe and I want to find number of days between these two column Below is the format of my data : *2016-12-23 23:56:02.0 (yyyy-MM-dd HH:mm:ss.S) I had tried lots of method but did not find…
1
vote
2 answers

MySQL `timestamp` to be updated even with same column value

I am using timestamp columns to one of my table, and using the auto update functionality. Here is my table schema: mysql> desc user_rides; +------------+--------------+------+-----+-------------------+-----------------------------+ | Field |…
avisheks
  • 1,178
  • 10
  • 27
1
vote
1 answer

PostgreSQL: insert sql statement with default timestamp - dbeaver vs php

Given this simple table: create table comments ( id numeric not null, comment text, created timestamp not null default now() ); Using dbeaver directly on the db from my pc, and executing this statement insert into comments (id,…
1
vote
1 answer

Prepared statement using Timestamp needs more nanoseconds

I am using the following statement to obtain a timestamp from my SQL DB: stmt.setTimestamp(i++, new java.sql.Timestamp(example.getExampleDate().getTime())) Which works just fine and returns: 2013-02-22 12:27:34.0 Now it happens that I need it to…
bngschmnd
  • 111
  • 1
  • 10
1
vote
1 answer

Getting weekly and daily averages of timestamp data

I currently have data on a Spark data frame that is formatted as such: Timestamp Number ......... ...... M-D-Y 3 M-D-Y 4900 The timestamp data is in no way uniform or consistent (i.e., I could have one value that is present on…
Eric Staner
  • 969
  • 2
  • 9
  • 14
1
vote
0 answers

how to count the database record using the timestamp in h2 (I need record for the latest 5 minutes)

I am new to the H2 database. How to query H2 database to get the records of a specific column for the last five minutes? I have tried something like this,it doesn't work.. select count(*) from SAMPLE.LOG where LOCKED_UTC >…
user123
  • 35
  • 2
  • 10
1
vote
2 answers

Get time interval between stop (row x) and start (row x+1)

I have a table in PostgreSQL 9.5 with two timestamps in each row, timestampstart and timestampstop. CREATE TABLE routes( ID serial PRIMARY KEY, TIMESTAMPSTART timestamp default NULL, TIMESTAMPEND timestamp default NULL ); Now I don´t…
1
vote
1 answer

How to get full timestamp value from dataframes? values being truncated

I have a function "toDate(v:String):Timestamp" that takes a string an converts it into a timestamp with the format "MM-DD-YYYY HH24:MI:SS.NS". I make a udf of the function: val u_to_date = sqlContext.udf.register("u_to_date", toDate_) The issue…
Andrew
  • 23
  • 3
1
vote
0 answers

SQL Timestamps vs. Java LocalDateTime

I've been comparing some fields and want to confirm my suspicion that although LocalDateTime fields might 'look' like the same values as converted timestamps, that they really don't hold the same values? I'm writing a record using: ... LocalDateTime…
MaybeWeAreAllRobots
  • 1,105
  • 2
  • 9
  • 12
1
vote
1 answer

MySQL : Timestamps replicating inconsistently depending on local timezone of server?

can anyone explain mysql 5.5 handling of replication between two servers. This is a structure of one of my table. id int(10) unsigned NOT NULL PRIMARY KEY DEFAULT 'NULL' AUTO_INCREMENT kot_no varchar(45) NOT NULL DEFAULT 'NULL' emp_id int(10)…
Hiran
  • 287
  • 4
  • 19
1
vote
3 answers

MySQL TIMESTAMP Update Warning

MySQL is giving me a hard time to update a timestamp column mysql> describe payments; +---------+------------------+------+-----+-------------------+----------------+ | Field | Type | Null | Key | Default | Extra …
MonoThreaded
  • 11,429
  • 12
  • 71
  • 102
0
votes
1 answer

Handling Date columns in SQL

I am trying to get some data from a SQL table. After reading the date the output looks like this ID BEGIN_DT END_DT PX_LAST ---------------------------------------------------------------- 13442 1900-01-01…
0
votes
1 answer

MS Access FE to SQL Server BE , cant add new Record to a table via ADODB

I'm in the process of migrating to SQL Server for my BE away from MS Access. Before we start I have checked and double checked the PK is ok.  There is 2 x 'Bit' fields but both are set to ((0)) with NO NULL set. I believe this is a 'SSMA_timeStamp…
Dave by 2
  • 1
  • 2
0
votes
1 answer

Unable to produce timestamp with milliseconds using to_timestamp function in spark SQL

I'm trying to convert a string to timestamp using spark SQL in Apache Spark Pool in Azure Synapse with to_timestamp function. Select to_timestamp('2009-06-12 01:07:22.024', 'yyyy-MM-dd HH:mm:ss.SSS') The result I got was - 2009-06-12T01:07:22Z I'm…