Questions tagged as 'timestamp'

1
answer

Laravel migration. Problem with timestamp

I have a migration for a travel table. The code is as follows: <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateToursTable extends Migration {...
asked by 03.12.2018 / 00:20
1
answer

Show Difference of 2 instants in SimpleDateFormat format ("yyyy-MM-dd HH: mm: ss.SSS") android

I have 2 buttons that get the start, end and duration timestamp of an event, but they look like java.text.SimpleDateFormat@f17b4ca5, but I do not know how to calculate the difference between them. I would like it to look like this: "2018-04-1...
asked by 15.04.2018 / 21:08
1
answer

Mysql Time Epoch subtract 4 hours

How do you spend 4 hours in a field that is in Time Epoch 1475638722 ? format I tried with DATE_SUB(field,INTERVAL 4 HOUR) but I did not get it.     
asked by 05.10.2016 / 05:46
2
answers

Compare two hours (TimeStamp) MySql Java

I must compare 2 hours one that is already registered from the database and the current time, I have been told that I can use the timestamp in MySQL make me return a true or false and minutes difference, then in java I should receive what retu...
asked by 21.05.2016 / 02:23
0
answers

Insert java.sql.Timestamp in MySQL

When I try to insert an object Timestamp of Java in a column of type Timestamp in MySQL I receive the following error:    com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '' for column '' f...
asked by 21.05.2017 / 23:46
2
answers

Filter by date PHP and MySQL

Good morning to everyone. I am trying to do a Select by filtering only by date in a DB with MySQL, in timestamp column format, where data with this format is inserted ('Y-m-d H: i: s'). The dates I receive from this form: Fil...
asked by 26.10.2016 / 10:15
3
answers

PHP timestamp, the variables have the same value at the end

The idea is to calculate the seconds that have passed since you entered the page until the button was clicked, using PHP. The thing is, I want to do this process on the same page, I had previously tried sending the request to a separate page,...
asked by 08.05.2018 / 09:47
1
answer

Get only the time of a TimeStamp (JAVA / Android)

I would like to know how I can get only the time of a TimeStamp like the following: From here I suppose that if I only take the time I should be given 20:00 PM (I do not want seconds). I have also read online that people prefer to us...
asked by 13.10.2018 / 00:41
3
answers

How is the laravel timestamp used?

What happens is that you create a new product form and I want it to be the same as the registration form delivered by laravel, that is, when you insert the product, the created_at and updated_at are automatically filled (already create the colum...
asked by 17.10.2018 / 21:20
2
answers

As determined by time () the default time zone PHP

This question has arisen because of working with dates. The problem is the following; getting the current time from the function getdate() that takes the function time() returns me a time that has nothing to do with my time zone (U...
asked by 30.04.2018 / 18:48