Most voted "date" questions
Date is the representation of a specific point in a calendar, usually represented by a day, month and year, the values of which may vary according to the culture and calendar used.
Learn more…887 questions
Sort by count of
-
2
votes2
answers1487
viewsHow to round age with Postgresql?
I used the function age(), below, to calculate age, from a date stored in a table: select pessoa.*, age(data_nascimento) from pessoa; Returned the range: 27 years 9 months 9 days It is possible to…
-
2
votes0
answers109
views"Error" loading date
I have a screen whose a certain "Reference Date" field receives the next available date of a file, following the dates that are in the database. On the field side I have a "Calendar" icon that when…
-
2
votes2
answers1234
viewsCalculate hours in PHP?
I am developing an electronic point in PHP and I would like to know how to do the Caculo of two hours being that one of them is negative, for example: Workload day 1: -05:00:00 Workload day 2:…
-
2
votes2
answers1233
viewsSELECT HTML field displaying Previous, current and next month only
I need to make the SELECT field that today is like this (code below) displayed only the previous, current and next month. For example: As we are in the month of MAY so it will display in this select…
-
2
votes2
answers1489
viewsDifference between two PHP dates in 31, 28 and 29 day months
I have a bonus system that only releases the bonus after 30 days of exact user registration. To compare the current date with the date of the user’s registration so that I get how many days to…
-
2
votes2
answers289
viewsWeka not recognizing attribute in "date" format
I have a treatment and testing suite that I created with a Java program. In the headline, it’s like this: *@attribute data date "yyyy-MM-dd"* And among other attributes. An example of a data line…
-
2
votes1
answer128
viewsHow do you know if two periods intersect?
Let’s assume I have two objects that have the following property: Objeto 1: Date dataAtivacao; Date dataDesativacao; Objeto 2: Date dataAtivacao; Date dataDesativacao; How to know if these dates…
-
2
votes1
answer191
viewsRedeem time period in r
Hello, I have a large series of temporal data. I have over 100 years to work. I need to rescue (abstract) only the summers of each of the years, and do not know how to do in R. For example, I need…
-
2
votes2
answers387
viewsHow to return strings that are in crescent date format in Sqlite?
I took a long and recorded on the bench in this format SimpleDateFormat("dd/MM/yyyy") which is a string and now I need to organize the dates. I tried to use this command but it comes in descending…
-
2
votes2
answers2556
viewsPick start and end date of one week of the month
Good afternoon, you guys. Today I’m having a problem getting the start date and end of a week of the month. Let’s go by parts: I have a combo that brings me the weeks of a month posted. To know how…
-
2
votes6
answers5628
viewsCalculate age in years using javascript
How to calculate age from an input type="text" using javascript? I have the input: <input style="width: 100%" type="text" readonly id="data_nascimento"/> How to perform this calculation? The…
-
2
votes2
answers1512
viewsConvert a date and send to the bank
The code is all working, the problem is the date, I want to take the date of a jformatedtextfiel ##/##/####### in the case txt_data and send to the bank, I’m in the java basics, I’ve been hooked…
-
2
votes1
answer673
viewsRange of dates VARCHAR/DATE
I have a date field (type VARCHAR) in my table, and recently I needed to search the database with date range. And for that I used the operator Between, getting something like: BETWEEN 15/08/2015 AND…
-
2
votes1
answer93
viewsSort Birthdays by Day
Guys, I needed a help to display on the screen the Birthday of the Month ordered by the day, in the bank he pulls the information from Senior so the date comes ex: 1970-10-30, in my controller is…
-
2
votes2
answers57
viewsPrint next days after 18/01/2016
I have to make a code where I put a date and need to know what are the next 5 days. For example, today is day 18/01/2016 the next days are 19/01/2016, 20/01/2016, 21/01/2016, 22/01/2016 and…
-
2
votes1
answer403
views -
2
votes1
answer177
viewsSum data with database values. Cakephp 3.0
I need to do a calculation that sums an integer to a date. This integer refers to days. $user = TableRegistry::get('PoliticaSenha'); $query = $user->find()->where(['id' =>…
-
2
votes1
answer2010
viewsCalculate Javascript Date Difference
I’m learning Javascript and I’m making a retirement calculator. I would like to know how to take the two dates inserted in the html form and calculate the difference between them and output the…
-
2
votes1
answer60
viewsString to Date conversion
I have html form with the following input: <div class="form-group"> <label class="col-md-4 control-label" for="textinput">Início:</label> <div class="col-md-4"> <input…
-
2
votes2
answers300
viewsError formatting date:
Hello, I’m formatting the date with the following code: Date data = null; SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { data =…
-
2
votes1
answer1232
viewsDate input in SAS
Please try to enter dates in various ways by input from SAS Enterprise Guide version 7.1, but anyway the result always comes out in numerical form, follow an example of the code: data work.family;…
-
2
votes1
answer174
viewsCommit Structure
I wonder if you have how to change a commit structure, in the case before it is made a predetermined structure, example: GIT_AUTHOR_NAME = '$name(Previamente registrado)' GIT_AUTHOR_DATE =…
-
2
votes1
answer804
viewsDelete files created before 10 days ago from current date
I am trying to automate the deletion of some backup files that a small application I made in swing creates, which over time, accumulates, occupying too much space in the network directory, which…
-
2
votes2
answers621
viewsPick up all hours that are between start time and end time with PHP
I’m developing a module and I need to take every hour between 2 hours, initial and final. Example: <?php $hora_inicial = '08:00'; $hora_final = '15:00'; ?> Then you’d have to list 08:00 09:00…
-
2
votes1
answer1435
viewsInserting holidays in jquery datepicker?
I have a method that alters the datepicker of jquery and inserts some special days (in the case of holidays of the state of RJ), when selecting a holiday, an Alert with the day is launched, however,…
-
2
votes2
answers574
viewsPostgresql query without data return
See the following SQL code: SELECT * FROM venda ve WHERE ve.datavenda <= DATE '28/08/2016' In the database you have the following data: The above SQL query is not returning any results, why?…
-
2
votes3
answers514
viewsReturn number of days for the end of the year
How could I make to return the amount of days to the end of the year, counting on today. import java.time.LocalDate; import java.time.Month; import java.time.Period; import…
-
2
votes2
answers3637
viewsFilter records by month and year in Laravel
I have a form with a field like month, that sends a value in the format Y-m for my controller. How do I search the records for the selected month and year? I’m using L5-Repository I did it this way,…
-
2
votes1
answer758
viewsSELECT for date with format dd/MM/yyyy hh:mm:ss
Consultation SELECT campo FROM Tabela WHERE data BETWEEN '2016-10-20' AND '2016-10-20' data and a field with type datetime ,I am having problems with the records for example that have the following…
-
2
votes1
answer395
viewsCalendar.MONTH returns incorrect month
I’m developing a method where I can get the date, month and year, to create a security key to connect to the server. Only I already checked the date of my emulator and my mobile phone is correct,…
-
2
votes1
answer264
viewsConvert C# Generated Date to ISO format in Javascript
Hello, I’m making a website where I use an API built in C#. My problem is that when I get a date from the server, it sends me in this format: [{ "dataLiberacao":"\/Date(928160400000-0300)\/",…
-
2
votes1
answer251
viewsDifference between dates in Months for range >= 12
To find the difference between two dates, the date_diff(). $datetime1 = date_create('2016-10-11'); $datetime2 = date_create('2018-10-11'); $interval = date_diff($datetime1, $datetime2); return…
-
2
votes2
answers637
viewsTime difference between Javascript and Mysql dates
Have data_inicio and data_fim and I want to know the difference of hours and minutes between them. The data_inicio will already be saved in the Mysql database as datetime, data_fim will pick the…
-
2
votes2
answers319
viewsProblem Converting String to Date
I have a project to do and I’m not able to convert String for Date. I want to compare the current date with the date of the query that is in textField Date, and if the current date has passed the…
-
2
votes2
answers92
viewsDate calculations in the query
I’ve been having a hard time for some time. I’ve been researching, but I haven’t found anything that would help me. I need to make a calculation in a query, is the following. I need to take the day…
-
2
votes2
answers207
viewsPrint full day of the week adding one day
I am trying to print the full day of the week (Monday, Tuesday...) of a date returned from the database. However, it is always printing with a day less, for example, instead of printing Monday, it…
-
2
votes1
answer255
viewsI cannot run a command with the "rDEA" package
I am a beginner in R and do not understand much of the solutions in English. I believe, therefore, that a forum in Portuguese can help me. I have the following database (date): I’m trying to run the…
-
2
votes0
answers108
viewsDate function returning day of month and incorrect time
I am trying to capture the date and time to check the time the user spent without doing any action on the system, but I am having problems with the PHP date function. The code is as follows:: $agora…
-
2
votes2
answers888
viewsWorking Hours Calculation - Java
How to calculate the working hours worked, for example, in the company if it works 540 minutes per day, in the system of orders of services I need to compute the hours of service executed, in this…
-
2
votes3
answers2679
viewsConvert number to date
Good afternoon, I wonder if there is a way to convert number to date in PHP. Example, in Excel the number 42873 is equivalent to date 18-05-2017. And I have how to do the opposite too. Is there a…
-
2
votes1
answer942
viewsHow to save a localdate to a mysql table?
I have a table book that has a column like "Date" and in my java code I have a field like "localdate". I need to save the data from the "Localdate" field in the table but I’m finding it difficult to…
-
2
votes1
answer47
viewsError using date type on android
I have this code: String dt = "2017-01-04"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); try { sdf.parse(dt); } catch (ParseException e) { e.printStackTrace(); } But when I use dt , in…
-
2
votes3
answers11376
viewsHow to return the first and last day of the current month in Javascript?
I’m having doubts on how to return the first and last day of the current month in JS.
-
2
votes1
answer342
viewsReceive date and time without separators and convert to date format
I would like to have the date and time in php, that way: Example: I’d like to receive that date: 09092017104430 And I wish the way out was something like this: 09/09/2017 10:44:30…
-
2
votes1
answer80
viewsDate Conversion/Formatting Problems
I’m having trouble formatting a date for useful, I need to format a date that this Tue Nov 22 00:00:00 BRST 2017 (example) for date in format dd/MM/yyyy. I’ve been seeing some links, like: How to…
-
2
votes1
answer8352
viewsHow to catch the current date on Android?
I am developing an application and need to pick up the current date only, I used the Date data = new Date(); only it doesn’t work. I tried localdatetime also more was not, someone has some…
-
2
votes2
answers3898
viewsHow to make a date field containing only Month and Year Html
I need a date field containing only Month and Year Html preference that enables on the screen something like a calendar containing only months and years. Obs: I’m using Angularjs, javascript…
-
2
votes1
answer69
viewsChange date to business date (Mysql)
I need to change the date of my database, considering the Business Date used in the company I work. Here, a commercial month is between 26/M-1/AAAA and 25/M/AAAA. Where M-1: last month. For example,…
-
2
votes3
answers1523
viewsHow to print Javascript variable value in HTML tag?
I’d like to limit the selection of input date this way, but it’s not working. <script type="text/javascript"> var data = new Date(); var dia = data.getDate(); var mes = data.getMonth(); var…
-
2
votes2
answers114
viewsError while trying to compare date
I’m trying to create a validation, to know if the user is at least 12 years old. I tried to base myself on that question: Comparison between dates. However, I believe I’m comparing it wrong, since…