Questions tagged as 'data'

3
answers

How do I know how many days the current month has?

How to know how many days the current MySQL month has, example: setembro = 30dias Reason: I have a goal: exemplo: 1.000,000 I need to get the value of the goal and divide by the number of days it has in the current month t...
asked by 21.09.2016 / 15:46
3
answers

How to subtract a date from the current system date

I want to subtract the current date from the system with the date that is written to mysql. I would like to insert the date in mysql through INSERT, manually, because I will not always use the current date to insert into the system. I need to...
asked by 19.11.2015 / 03:24
3
answers

How to humanize dates in javascript

Given a date ex: 5/24/1982, how to turn into years, months and days? In the above example it would be converted to 33 years 1 month and 1 day. The idea is to do everything in Javascript.     
asked by 25.06.2015 / 14:38
3
answers

Create a table with dates [closed]

I'm creating a table and need the columns to be created as follows: Mon, 23 Nov | Tue, 24 Nov | Wed, 25 Nov | Thu, 26 Nov | Fri, 27 Nov | Sat, 28 Nov | Sun, 29 Nov To create the table I pass by a date parameter (which is selected through a ca...
asked by 26.11.2015 / 17:30
2
answers

How to change the PHP DateTime JSON serialization format?

In PHP, when I use a json_encode in an object of type DateTime , it has the following result: $date = new DateTime(); echo json_encode(compact('date'), JSON_PRETTY_PRINT); Output: { "date": { "date": "2018-08-09...
asked by 09.08.2018 / 19:01
1
answer

How can I make a new year script?

Well guys, I tried to do it but I could not. I want a javascript code that automatically activates only after midnight. See the code: var agora = new Date(); var anoNovo = new Date(2017, 0, 1, 0, 0, 0, 0); var anoNovoMax = new Date(2017, 0, 1,...
asked by 31.12.2016 / 14:48
1
answer

I want to compare start date and end date. The start date always needs to be smaller than the end date. CompareTo () I encountered an error

When the end date is with the 00:00 time, it identifies that the start date is longer than the end date but it is not, the start date is still shorter. When I put the end date using 14/01/2017 23:45 the method returns me -1 . But...
asked by 15.01.2017 / 01:13
1
answer

Limit for strtotime function in php [duplicate]

I'm using the strtotime function as shown below, with cakephp. by passing the sum of 50 years it is returning null, the maximum that I can return is summing 20 years. Would anyone know if this is limiting / configuring cakephp or php itself...
asked by 25.01.2016 / 15:01
2
answers

Query in MySQL to return scheduled records for the next 30 days

I have a table called AGENDA, where I have the fields, ID, Location, Date. Doing the insertion and selection within the database I've already been able to do correctly. But I can not select the date in ascending order, showing the events that wi...
asked by 03.05.2014 / 04:22
1
answer

Scrolling Dates using Calendar

I'm making a report on java , which passes a period specified by the user. In my%% of% I'm doing the treatment. Here I pick up the date passed. String data1 = DateUtil.toString(dto.getDataInicio(), "MM/yyyy"); String data2 =...
asked by 01.02.2017 / 13:10