Questions tagged as 'data'

2
answers

How to format date with Moment.js?

I need to format a date with Moment.js like this: 10 de Dezembro/2018. I tried this way: "DD [de] MMMM/YYYY" But the month is 1 lowercase letter. What's wrong?     
asked by 10.12.2018 / 19:53
2
answers

Calculate days difference between two dates [PHP] [duplicate]

Good afternoon everyone! I did research before asking the question, but I did not get an answer for my doubt in any of them. I need help getting the following code to receive the two dates by the $ _GET variable, example (.php? data1 = 23-0...
asked by 23.09.2016 / 18:09
3
answers

Calculate difference between two dates to validate date fields [duplicate]

I needed to find a mechanism to limit a search that never exceeded 3 months. I have two dates, I want to validate if they are within the defined parameters. I have this code () I'm using type date and datepicker to run on multiple browse...
asked by 14.09.2015 / 11:01
3
answers

Return time and minutes difference with PHP

I have this simple file: test.php <?php $date1='2018-01-09 16:14:01'; $date2='2018-01-09 17:30:04'; $dateS1 = new \DateTime($date1); $dateS2 = new \DateTime($date2); $dateDiff = $dateS1->diff($dateS2); $result = $da...
asked by 10.01.2018 / 14:17
3
answers

Calculations with date in the query

I have had a hard time for some time. I have searched, but I have not found anything that would help me. I need to do a calculation on a query, it is the following. I need to get the day the record was entered in the bank and then do an opera...
asked by 10.01.2017 / 19:08
2
answers

Format java.time.Duration for String

The code below is producing the following output: Resultado: PT2H30M I would like it to be: Resultado: 2:30 Does anyone know how I can do it? import java.time.Duration; import java.time.LocalDateTime; public class TesteDuration { pu...
asked by 22.01.2017 / 17:01
2
answers

How to get tomorrow's date with JavaScript?

Hello. I have this code: var datas = new Date(); console.log(datas.toLocaleDateString()); He returns me: 05/22/2017 Home Can you make him come back with an extra day? so: 05/23/2017     
asked by 23.05.2017 / 00:15
1
answer

Concatenate date in PHP to insert into MySQL

Good morning, my question is the method of concatenating and creating a Datetime to insert into a database. Having the variables: $dia = '2018-04-11'; $hora = '09:36'; The desired format is: AAAA-MM-DD HH:MM:SS How do I merge and...
asked by 11.04.2018 / 10:42
1
answer

Convert LocalDate to LocalDateTime

I have the following attributes in my Filter class: private LocalDate periodoDe; private LocalDate periodoAte; However, the object on which the information is the attribute that will be filtered is LocalDateTime , so in my tests, I do...
asked by 19.09.2018 / 20:09
2
answers

Convert string to list?

I needed to pass%% of type: 0.4350 0.8798 0.0099 1 for a string [0.4350, 0.8798, 0.0099, 1] with a simple list . How can I do this?     
asked by 01.05.2017 / 16:46