sql-timestamp Questions

5

I have a simple select query such as below but I noticed I am getting back the regional times. How can I convert to UTC in my select statment? select myTimeStamp, MyName, MyBranch from tableA ...
Cartwell asked 27/3, 2014 at 13:24

3

Solved

I have a base class for persisted entities like this: @EntityListeners(AuditListener.class) @MappedSuperclass public abstract class BaseEntity { @Id private String id; private Instant createdAt;...
Streetwalker asked 14/3, 2023 at 13:36

5

Solved

I am getting this error when I try to insert '2011/03/13 02:53:50.000000000' into a timestamp column. If I change the 13 to a 15, 14, 12 or 11 it works no problem. I've also tried changing the /'s ...
Heartsease asked 24/2, 2016 at 13:1

0

I'm facing a problem using Liquibase with MySQL 8 where the following script is not putting the fraction part of type "time(3)", it only puts "time" on the type of the column. W...
Robbins asked 12/10, 2022 at 8:36

7

Solved

I'm trying to apply the following migration: Schema::table('users', function (Blueprint $table) { $table->timestamp('created_at')->useCurrent()->change(); }); But artisan says: [Doct...
Tiffanitiffanie asked 13/1, 2016 at 18:43

2

How can I implement created_at and updated_at columns using Room Persistence ORM tools in Android, that can update the timestamp automatically when creating or updating a row in a table?
Fishworm asked 22/2, 2018 at 8:8

2

Solved

I am using SqlAlchemy on python3.4.3 to manage a MySQL database. I was creating a table with: from datetime import datetime from sqlalchemy import Column, text, create_engine from sqlalchemy.type...
Ranchod asked 16/11, 2015 at 19:46

1

I want to insert the current timestamp as datetime data type into sql server using Scala. So far I have tried this: import java.time.LocalDateTime import java.time.format.DateTimeFormatter var ...
Palpate asked 27/6, 2019 at 21:59

2

Solved

I need to look up rows within a particular time frame. select * from TableA where startdate >= '12-01-2012 21:24:00' and startdate <= '12-01-2012 21:25:33' I.e.: I need to look up rows...
Phosphaturia asked 13/1, 2012 at 18:27

3

Solved

Here's my migration schema: public function up() { Schema::create('objects', function (Blueprint $table) { $table->increments('id'); $table->timestamp('timestamp1'); $table->timestamp...
Breckenridge asked 3/5, 2018 at 13:40

3

Solved

I am trying to convert a TIMESTAMP field in a table to a string so that it can be printed or executed as part of dynamic SQL. SSMS is able to do it, so there must be a built-in method to do it. How...
Demarco asked 7/12, 2016 at 10:5

4

Solved

Hi I am trying to extract the month and year part of a timestamp column in hive using the below query select from_unixtime(unix_timestamp(upd_gmt_ts,'yyyyMM')) from abc.test; The output looks li...
Logjam asked 10/1, 2017 at 6:18

2

Solved

I know java Date was poor designed, but I don't know how until today. I saved a date to DB and when I get it from DB and compare to original date, it told me it's different! And I wrote a test wh...
Hanlon asked 10/5, 2017 at 3:3

1

I have a table containing a array of timestamps, like the following: CREATE TABLE start_times ( start_date timestamp[] ); I am not sure how to insert the timestamp values into the array. I read ...
Kratz asked 14/10, 2015 at 16:59

1

Solved

I have a postgresql table with a column of type timestamp without timezone. Every row increases/decreases by 1 minute eg: 2015-07-28 01:35:00 2015-07-28 01:34:00 2015-07-28 01:33:00 ... ... 2015-0...
Bradshaw asked 28/7, 2015 at 6:18

2

Solved

I'm trying to insert records with YYYY-MM-DD HH:MM:SS format into Oracle from Netezza, but I'm getting invalid date type. How can I accomplish this one? CREATE TABLE AM_PROGRAM_TUNING_EVENT_TMP1...
Melanism asked 25/4, 2012 at 16:33
1

© 2022 - 2024 — McMap. All rights reserved.