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
-
3
votes2
answers1861
viewsHow to consult birthday and month in SQL on Oracle?
I saw some examples here, and tried to reproduce them, however, on Oracle does not accept operators as MONTH, then I was unsuccessful. SELECT nome from aluno where month(datanascimento) =…
-
3
votes2
answers1988
viewsHow to get the last day of a month with Momentjs?
I’m using MomentJS and I need to pick up the first and last day of the current month. Currently, to catch the first day of the month I’m doing so: var data_inicial = moment().format('01/MM/YYYY') So…
-
3
votes1
answer867
viewsHow to filter time in a datime field in eloquent?
How can I compare if a time is equal to a time stored in a column datetime using the Eloquent?
-
3
votes4
answers3071
viewsIf condition in Where SQL Server
I have a Stored Procedure where I need to do a check for a date filter, in case the start date is null I have to do on WHERE take all records less than the final date, otherwise I make a BETWEEN…
-
3
votes2
answers3118
viewsHow to format date with the name of the month in Portuguese and capitalized in Moment.js?
I need to format a date with the Moment.js thus: 10 de Dezembro/2018. I tried so: "DD [de] MMMM/YYYY" But the month is down to 1 letter. What’s wrong?…
-
3
votes3
answers2296
viewsHow to format a "date" column inside of a data.frame in R?
I’m having trouble formatting a column with dates in my database. Example: 01/08/2018 06:02:44 I would like to format the column by removing the team and in another column indicate the corresponding…
-
3
votes1
answer114
viewsDetect date change in Windows [C#]
I would like to know: How can I detect and display a warning to the user through a MessageBox, whenever my application is running (is maximized or minimized) and the date of the computer is changed?…
-
3
votes1
answer31
viewsConvert normal numbers to date
I wonder, if there is how to convert normal number to date format in PHP. Example, a user types 09012001 into a input of type text and the value returned in a echo further down be 09/01/2001 This is…
-
3
votes1
answer772
viewsCheck if a string is a valid date
How do I check whether the date is valid in C or not#? In VB6 I did like this: If Not IsDate(strAux) Then In the case of C#, how do I? My code in C#: //Data Movimento string strTxt =…
-
3
votes3
answers1730
viewsChange date format from "yyyy-mm-dd" to "dd/mm/yyyy"
I’m trying to change the shape of a date yyyy-mm-dd for dd/mm/yyyy. I’m using this code: $date = "2019-03-27"; $date1 = new DateTime(date_create_from_format('Y-m-d', $date)->format('d/m/Y'));…
-
3
votes2
answers3465
viewsHow to invert the order of columns of a Dataframe with Python
Oops, I wonder how I can invert entire columns with using python. FRUTA | VITAMINA | PREÇO LARANJA | C | 2.00 MAÇÃ | B1 | 2.00 BANANA | B2 | 1.00 I would like to know how I can transform the…
-
3
votes1
answer1172
viewsCheck whether date is even or odd
I am in need of help with dates in SQL Server. I have a date field and would like to know if this date is odd or even. Because I need to make this comparison to use in another field. I looked for…
-
3
votes4
answers2211
viewsJavascript converting wrong date
I need to convert date of type yyyy-mm-dd for dd/mm/yyyy. For this, I’m using the function in Javascript: data_formatar = new Date("2019-01-15") data = data_formatar.toLocaleDateString('pt-BR');…
-
3
votes1
answer148
viewsPHP date function is returning the day in place of the month
I need to format the date received from a $_POST as follows: date('Y-m-d', strtotime($_POST['data'])); ///O POST está enviando 10/05/2019 << Dia/Mês/Ano. But the return of that function was…
-
3
votes3
answers3895
viewsPython date validation (tests)
I am trying to do a date validation with Python. My exercise asks for the validation of months with 31 days and leap year. def data_valida(data): #Valida data. Recebe uma string no formato…
-
3
votes3
answers1314
viewsHow to handle different date formats?
I have an application that at a certain time I recover the obtained date from the system, save it in a table in the database (Sqlite) and then recover it. The problem is that in determinator devices…
-
3
votes1
answer93
viewsUnixtimestamp for Date Javascript
I am receiving a JSON in which the date is being returned in this way: /Date(1563568740000+0200)/ I believe it is Unixtimestamp, but I can not convert it to format Date javascript. I’ve tried to do…
-
3
votes3
answers502
viewsAdd an hour to the current time
I’m trying to record the current system time. For example the current date will be 01-08-2019 10:34:44 and I wanted that same date, but add another hour, IE, would be 01-08-2019 11:34:44.…
-
3
votes2
answers119
viewsCalendar showing the difference between two dates
I want to make a difference calculator between dates. One that can make a difference in days, hours, etc. Example: Initial - 07/17/2019 for Final - 07/29/2020. How long (in days) is the starting…
-
3
votes0
answers959
viewsProblem saving date with Time Zone (Time Zone) in SQL Server
I need my system to store dates (date and time) with time zone (time zone). The system needs to support multiple databases, so far SQL Server and Postgresql. With Postgresql the time zone…
-
3
votes1
answer294
viewsHow to convert the String "20190930120000[-3:BRT]" to Localdatetime
I got the following String: "20190930120000[-3:BRT]". I need to convert to LocalDateTime. Does anyone know the mask to be used in DateTimeFormatter.ofPattern("?????")? I’ve come this far:…
-
3
votes2
answers249
viewsDate in Javascript with October 31st
I am trying to find the due date adding the date, but I realized that the function does not return me the day 31 October 2019. Follow the code below that returns me '1 / 11 / 2019' and should return…
-
3
votes1
answer691
viewsInsert a Datetime into a date type input tag
I am trying to insert the current date into a tag input of the kind datetime-local. Tag Input: <input type="datetime-local" id="inputDateNow" class="registerInput inputCodeDate"…
-
3
votes1
answer946
viewsDate format in python
How to take the current date and format in Brazilian format '28/10/2019'
-
3
votes1
answer363
viewsWhy when creating a Calendar, do I need to subtract 1 of the month?
When I create a product and call the constructor passing the parameters, including day, month and year, I’m not able to understand why I need to subtract 1 month in the method set, note below:…
-
3
votes1
answer114
viewsHow to transform string into Date object with Typescript?
I am receiving from the HTML form a string containing the date selected in the pattern dd/mm/yyyy, and want to create an object Date from that string. The problem is that the Date only accepts…
-
3
votes1
answer296
viewsPeriod of days between two dates, when the final date is less than the initial
In PHP when I try to return the running days of a month I only get the future days: $inicio = new DateTime('2019-11-12'); $fim = clone $inicio; $fim->add(new DateInterval('P1M')); // intervalo de…
-
3
votes1
answer342
viewsDate coming with date tomorrow instead of today
My date’s coming up with the wrong date, tomorrow’s coming up plus I want today’s date. For my application the date and time cannot be wrong. I’ve checked the date on the server and it’s correct:…
-
3
votes1
answer231
views -
3
votes1
answer629
viewsKeyerror: '>R' in Google Colab Python
I copied the following code from a data visualization tutorial in Python, but it does not perform properly, warning Keyerror as seen in the title. Can someone help me? There’s something wrong there?…
-
3
votes1
answer835
viewsHow to add days to a date with Moment.js?
I’m trying to calculate the deadline of my site in days, IE, I put "14 days" and it turns into 00/00/0000. I’m doing it this way, but she’s taking the full date and turning it into days, I want to…
-
3
votes2
answers57
viewsFormat string for (dd/mm)
I get a 4-digit string (numbers), and I need to break it in half, and put a "/", to format in type (dd/mm) <input [(ngModel)]="contato.birth" class="form-control" type="text"…
-
3
votes1
answer292
viewsWhere can I find the reference for defining dates of the dd/mm/yyyy format?
I’m doing the documentation of an API, but I don’t know where I can find what defines the date in the Brazilian, Italian, etc., formatting styles dd/mm/yyyy. Dates in format yyyy-mm-dd are defined…
-
3
votes1
answer517
viewsCalculation of age in Java
I have a code that should calculate the age, but in my test I can’t catch the day nor the month of Data and yet age comes wrong due to this. On the test returns 32 years, while it should be 31.…
-
3
votes3
answers126
viewsString to date.parse Javascript conversion problem
I’m getting in a date value variable on string and making the conversion to date, to be able to make a condition. The problem is that when the date comes as 31/12, the variable gets NaN. Follow the…
-
3
votes1
answer35
viewsHow to check the periodicity of a series in the R?
I have a database with 5182 series and I need to check if these are daily, monthly or quarterly. Doing this job manually would take a lot of time, so my question is: It is possible to check whether…
-
3
votes4
answers285
viewsSeparate data by values on the line?
In the lines of my dataframe I have an identifier with letters for each observation set. Some of the observations have more than one letter, in which case these observations are actions together of…
-
3
votes2
answers100
viewsProblem with Javascript date comparison
I have a Javascript function that is to check if the "current data_is" is larger than "data_validity". If larger, it is to display on the screen the "Expired" text, if not, keep the "Valid" text".…
-
3
votes2
answers100
viewsProblem with Javascript date comparison
I have a Javascript function that is to check if the "current data_is" is larger than "data_validity". If larger, it is to display on the screen the "Expired" text, if not, keep the "Valid" text".…
-
2
votes5
answers6608
viewsCapture dates of a text using regular expression in javascript
I have a function that returns data in JSON and places in certain places with jQuery. One of these data is a text that contains a period of dates (Beginning and end). Example of returned text:…
-
2
votes1
answer148
viewsLast Login Date and Time
I put this line in the code php: $lastlogdate=time(); To get the date and time when logging in, more when I see it looks like this: 1397562733 I wish it would stay that way: 17/04/14…
-
2
votes3
answers8837
viewsHow to work with dates in the dd/mm/yyyy format in Vb.net?
I have a text box named txt_cadastro.Text. When using the following command: txt_cadastro.Text = DateString Man textbox is completed in the following format: 04-23-2014 What do I do for it to be…
-
2
votes3
answers318
viewsConverting 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…
-
2
votes2
answers862
viewsConverting String to Date and adding days to a specific date.
I’m trying to sum up a date with another 30 days, down with the way I’m trying to do: function validarContinuacaoCiclo(){ var dataEmissaoGuia = $("#hiddenDataEmissaoGuia").val(); var…
-
2
votes2
answers862
viewsConverting String to Date and adding days to a specific date.
I’m trying to sum up a date with another 30 days, down with the way I’m trying to do: function validarContinuacaoCiclo(){ var dataEmissaoGuia = $("#hiddenDataEmissaoGuia").val(); var…
-
2
votes2
answers9275
viewsWrong time problem in PHP (America/Sao_paulo)
I’m running an application in a Centos production environment with updated PHP and Apache. I realized that the logs Cakephp returns a wrong time from the set in php.ini and also set inside the…
-
2
votes1
answer97
viewsHow to calculate the total seconds in a date range list by ignoring intersections of intervals in Python?
I am trying to calculate the total time in a list of date ranges in Python, and if there is intersection between the intervals, it must merge to be calculated as if it were a new interval. Interval…
-
2
votes1
answer104
viewsClient side deleted object instance and sends to the server
I wonder if anyone has ever been through this problem and how did you solve it. I am using JSP and Spring Data JPA. I delete records from the middle of a form that’s a detail using Javascript,…
-
2
votes2
answers8864
viewsFormatting date field with jQuery Masked Input
Expensive, I searched and tested in many ways how to format a date field in jQuery but it’s not working. I’ve imported the jQuery Masked Input in the JSP:…
-
2
votes2
answers492
viewsMysql due date
I have a register where I store the registration date of the products. However I need to delete these products after 5 days registered in the database. I tried to use the PHP with the following…