Questions tagged as 'data'

2
answers

How to round up age with PostgreSQL?

I used the age() function, below, to calculate the age, from a date stored in a table: select pessoa.*, age(data_nascimento) from pessoa; Returned the range: 27 years 9 months 9 days Is it possible to round this range to only 27...
asked by 17.06.2015 / 03:07
2
answers

Problem with wrong time in PHP (America / Sao_Paulo)

I'm running an application running in a CentOS production environment with PHP and Apache updated. I noticed that CakePHP's logs return a wrong time from the one defined in php.ini and also set inside the application's Bootstrap by...
asked by 20.01.2015 / 18:37
1
answer

How to calculate the second totals in a date range list by ignoring intersections of intervals in Python?

I'm trying to calculate the total time in a list of date ranges in Python, and if there is an intersection between the ranges, it should merge to be calculated as if it were a new range. Interval 1: intervalos = [ {'inicio': datetime(20...
asked by 26.11.2014 / 20:54
2
answers

Converting String to Date and adding days to a specific date.

I'm trying to sum up a date with 30 more days, below the way I'm trying to do: function validarContinuacaoCiclo(){ var dataEmissaoGuia = $("#hiddenDataEmissaoGuia").val(); var dataPrevistaAdministracao = $("#dataPrevi...
asked by 12.08.2014 / 02:19
3
answers

Converting a datetime to text does not show the result

I have a date in this format: Quarta, 21 Maio, 2014 . To save this date in the database I'm converting it to datetime as follows: $f['data'] = $_POST['data']; $data = DateTime::createFromFormat('l, j F, Y', $f['data']); $data...
asked by 21.05.2014 / 21:11
1
answer

How to join two data.frames in R with different variables and out of order?

I have two data.frames: frame1 <- data.frame(dia=c("02/01/2017","03/01/2017","04/01/2017","05/01/2017"), y=c(2,2,1,2),w=c(4,4,2,2),z=c(25,16,24,30), k=c("sim","nao","sim","nao")) frame2 <- data.frame(dia=c("05/01/2017","04/01/2017","03/0...
asked by 30.12.2017 / 03:32
1
answer

program does not take the system date

I have a program that I'm doing a test to see how it works out but I could not find the error that causes it not to return the system date and time, I thought it was regex but it is not already mexi practically in the constructor whole and nothi...
asked by 14.09.2017 / 06:15
1
answer

Calculate difference between dates in JavaScript

I'm learning Javascript and I'm making a retirement calculator. I would like to know how to get the two dates entered in the html form and calculate the difference between them and give the difference as output. I have the following html &l...
asked by 02.04.2016 / 18:35
1
answer

Add date with bank values. CakePHP 3.0

I need to make a calculation that adds an integer to a date. This whole number refers to days. $user = TableRegistry::get('PoliticaSenha'); $query = $user->find()->where(['id' => $usuario['politica_senha_id']])->first(); $dataTro...
asked by 25.01.2016 / 12:41
1
answer

Client side object instance deleted and sent to server

I would like to know if anyone has already had this problem and how to resolve it. I'm using JSP and Spring Data JPA. Deleto records the middle of a form that is a detail using Javascript, right? But when I give a POST, the server creates...
asked by 07.01.2015 / 19:44