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
-
0
votes1
answer867
viewsView day of the week as date used in PHP query
Good afternoon everyone, I’m having a question on a course project. I have a form where I look for scheduled patients on a certain day of the month. When I perform the appointment to present the…
-
0
votes1
answer867
viewsView day of the week as date used in PHP query
Good afternoon everyone, I’m having a question on a course project. I have a form where I look for scheduled patients on a certain day of the month. When I perform the appointment to present the…
-
0
votes1
answer53
viewsis repeating only once
Code: #include <iomanip> #include <iostream> int main() { auto time = std::time(nullptr); std::string…
-
0
votes1
answer2176
viewsChange date format in Java?
My date format ta yyyy-mm-dd and I want to change to dd-mm-yyyy I’m pulling the data from an api, so I put it with the "-" example: 2017-12-31 because before it only came with 20171231 but I want to…
-
0
votes0
answers76
viewsHow to convert `data java.util.Date` to `java.sql.Date`?
The idea is to consult the data by dates in the database (Mysql): I have 2 fields JXDatePicker and I want the return of the data between the initial date and the final date. In Mysql, the field date…
-
0
votes0
answers40
viewsHow to compare 2 fields with date
Hello, I have two fields, one with today’s date and one with a date in nine days. I need to make a comparison between the 2 fields to know if the field with the second date is in 10 days or less,…
-
0
votes1
answer229
viewsRange defined by SQL user
In sql there is some way to define the range of a query according to the user’s past ? Example Number of days the user enters for 7, and set as registration date day 07/01/2018, the bank return the…
-
0
votes0
answers46
viewsgetTime() returns unixtme different from date
I have a date string that when I assign this string to a date and later I’ll take the getTime of it, if the application is running on different machines the returned unixtime comes with a few…
-
0
votes0
answers22
viewsFormatting date to save
Hello, I need to convert a date that is in String to save to a variable data_inicio of the kind Date in Mysql and I did it as follows: String data = "14/11/2017"; SimpleDateFormat formataData = new…
-
0
votes1
answer161
viewsJavascript does not work
Why is my Javascript code not working? My other codes always work, but this one doesn’t have to make it work. I want to put a date clock at the top of the page and I don’t want to leave those lines…
-
0
votes1
answer451
viewsHow to sort and sequence data from a file
I developed a program that stores a list of ids, so But for the desired purpose, the data should take the sequential form, so that the first pair of ids is something like: "889926212541448192"…
-
0
votes2
answers2097
viewsFormat date in javascript
The code has an array that receives the information from DB. The date field receives the date in YYYY-MM-DD format, but I would like to display it in the following order DD-MM-YYYY. Could you help…
-
0
votes3
answers285
viewsCompare and replace Intel array
The problem and the following, I am creating daily OS chart, only that comes from the bank with day in English, I would like to replace each index with the value in Portuguese My code public…
-
0
votes0
answers83
viewsThe wrong date Julian calendar
I made the following program based on one of my scripts that makes other calculations but the same is returning wrong dates to the Julian calendar, because 14/March/1964 falls on Friday, and…
-
0
votes1
answer302
viewsFormat ISO date (yyyy-MM-ddThh:mm:ss.sssZ) to be displayed in INPUT (dd/mm/yyyy hh:mm)
The server gives me the date in ISO format (yyyy-MM-ddThh:mm:ss.sssZ). How do I have this date displayed in the input with dd/mm/yyyy hh:mm format? <input type="date" class="form-control"…
-
0
votes1
answer282
viewsReturn the last Array date
Hello, I have a code where I am searching a list of dates. for(var i = 0; i < data.list.length; i++){ if(Date.parse(data.list[i].date) >= dateA){ console.log(data.list[i].date) } } i wonder if…
-
0
votes1
answer51
viewsShow line of code according to date
I have a static page that will work offline with the proposal to be a control panel that will have the "day schedule" of a church. In one of the columns (as shown in the image) one of the videos…
-
0
votes1
answer180
viewsGoogle Gson Problems: Unparseable date: "Apr 19, 1991"
I work with Google Gson to persist and recover Java objects. I use this code to create and format Gson, with the aim of preplanning it to receive certain date formats, which come from forms and the…
-
0
votes0
answers77
viewsI cannot compare dates with Datetime() in PHP
I have a form where I send the date 1-4-2017 in each separate field(day, month and year). The code below receives the date normally, but when it arrives at the part of the comparison it does not…
-
0
votes1
answer1927
viewsA: How to turn date only year (four digits) into a data frame?
I have a date frame with the column below. I would like to turn the years (with 4 digits) into dates (as.Date). The idea would be to keep only the years even. I tried some solutions I’ve seen…
-
0
votes1
answer216
viewsTrue return function returns false in a Vue expression
I created a method that serves to take the difference of a certain date with today’s date. With the code I put, it returns true. But when I use it within a computed value, it returns undefined. And…
-
0
votes2
answers155
viewsLogic - Knowing if you are on the second day of the month
I’m having difficulty formulating a logic to know whether or not the day I’m on is for example the second Saturday of the month of February. With the code I made I can take the day I am, month and…
-
0
votes0
answers58
viewsBring the last date according to entered code!
I have a spreadsheet where I bring the client’s code and a visit date, I would like a formula where through the code I bring the last example date Cod. Date of Visit 1 01/04/2018 2 01/04/2018 3…
-
0
votes1
answer5007
viewsValidate birth date field with javascript
I got a field like date, by name txtdata_nasc. I need a validation for it. I need you to have a button next to it that can validate it. If a person enters a birth date under 18 years of age, I want…
-
0
votes2
answers40
viewsDate format in php
How to change the format of the date 2016-2-26 to 02/26/2016. I tried using the format, but it didn’t work.
-
0
votes1
answer40
viewsGenerate file D-1
How to perform the select of data in format D-1 (current day - 1), what would be in VBA a AGORA() - 1, how it would be in postgresql? I have the following query and would like to take yesterday to…
-
0
votes1
answer56
viewsCounter from a value
Hello, I am creating a time counter, to make a music progress bar. I am using the following code. However, this counter starts counting at 00:00 as obviously, but I would like it to start counting…
-
0
votes2
answers90
views -
0
votes1
answer416
viewsMake datepicker date range to be used in mysql
In my code, I have a calendar where the user selects the period he wants to analyze. The code is this: <input type="text" name="daterange" value="01/01/2012 - 20/04/2018" /> <script…
-
0
votes0
answers44
viewsUnknown date format on Oracle
Good morning. I have to access the data in an Oracle database, where a field described as "validation date" has the following data: DtValid ------- 115365 115364 115363 115362 115361 Does anyone…
-
0
votes1
answer1355
viewsList days of the week with month and year PHP
I am wanting to print the days of the week separated by the number of the week of a given month: What I have so far is: function days_week($date = NULL){ $date = ($date == NULL) ? date('m/d/Y') :…
-
0
votes1
answer76
viewsArchive keyboard entries in Python
I am building a code to retain any command made by the keyboard, they will be published in a topic of the ROS structure to control a mobile robot. I’m not very familiar with Python, the most I could…
-
0
votes1
answer26
viewsSave information about execution days
Good afternoon, you guys. I have an automation monitoring system that consumes a table that contains information about n automations registered, about 40 currently. I would however like to do a…
-
0
votes0
answers87
viewsDatepicker update dates according to return of an ajax
I want to display a calendar with only some dates enabled, I make an ajax request that returns me an array with the dates I want to enable, the function I have today is similar to this example here…
-
0
votes0
answers133
viewsConvert Varchar column to Date without losing the data
Before the database was saving the date in a varchar field and in the Brazilian standard (dd/mm/YYYY), then I modified the values using the code below: UPDATE tabela SET coluna=…
-
0
votes1
answer1251
viewsConvert PHP data to save to Mysql database
I need to receive a date using the datapicker as dd/mm/yyyy and switch to database format (mysql). have the access methods (Getter and Setter) in them applied this date function and strstring to…
-
0
votes1
answer1312
viewsAdd days to current date
I need to take the current date and add days according to the selected function calcular(){ var valor1 = parseInt(document.getElementById('dias1').value); var valor2 =…
-
0
votes0
answers80
viewsDates with php google Charts
I need to get the date and put it on a chart of Google Chart, for example: Sales today, this week, this month. $sql = "SELECT dataCaptura FROM produtos"; //Trazendo resultados da tabela $result =…
-
0
votes2
answers2054
viewsFormat Angular Date
Hello, I have the following string: Tue Oct 16 2018 00:00:00 GMT-0300 (-03) And I wanted to format it into dd/mm/yyyy and my goal is to stay 16/10/2018 How I would have to do this formatting…
-
0
votes1
answer412
viewsmysql select order by starting with today’s date
I have this appointment that seeks birthdays of the month: $mesHoje = date("m"); $sqlAni = $pdo->prepare('SELECT * FROM aniversario WHERE MONTH(dia) = :mesHoje ORDER BY dia ASC');…
-
0
votes0
answers784
viewsFiltering by date with dataTables how to do - uncomplicated
Hello! I’m implementing the data filter with jquery datatable, with the draw() feature embedded. It’s a little complicated so I’d like to see if anyone can understand. I put the code in the fiddle:…
-
0
votes1
answer253
viewsThe period between two dates
How to get a period between two dates? d1, _ := time.Parse(time.RFC3339, "2018-10-27T00:00:00Z") d2, _ := time.Parse(time.RFC3339, "2018-10-28T00:00:00Z") // Não funciona. fmt.Println(d2 - d1)…
-
0
votes1
answer227
viewsASP.Net and C# - Reducing dropdown options according to current date
On my client’s website, I have a dropdown list with the months of the year. Unfortunately, the value property has months written instead of numbers. <asp:DropDownList ID="ddlMesReajuste"…
-
0
votes1
answer100
viewsAdd date in days until specific day of the week
I have a mission for you. I am developing a sales system for the company I work for. Some customers require billets to be issued maturing on specific days, Ex: The company Fulano LTDA requires that…
-
0
votes2
answers169
views -
0
votes1
answer86
viewsHow to pick the difference in time between two dates using the Carbon plugin, where it shows me whether it is positive or negative
Example: $primeiraData = Carbon::parse('2019-02-01 13:00:00'); $segundaData = Carbon::parse('2019-02-02 14:00:00'); $resultado = $segundaData->diffInHours($primeiraData); Regardless of the order…
-
0
votes2
answers72
viewsShow first and last record of each date
I would like to search the database for all records according to the "DOCTOR" between two dates DATA_INICIAL and DATA_FINAL No repeat records of the day. CURRENT RESULT: BRUNO BARBOSAS 02/04/2018…
-
0
votes1
answer54
viewsmvc input date is changing format when I change google Chrome language
I have a website made in MVC and I have a datepicker, I want the date format of Portugal (dd-mm-yyyy), it works when I have google browser Chrome in Portuguese but when I put it in Inglish (USA) it…
-
0
votes2
answers80
viewsConverting PHP Data to pt_br format
How I can convert the date of 2019-02-22 for the Brazilian format 22/02/2019? $data_atual = date('d-m-Y H:i:s'); date_default_timezone_set('America/Sao_Paulo'); $data_ult_aces =…
-
0
votes1
answer437
viewsDate input in jQuery
I am looking for a simple way to get the values of day, month and year separated from one input of the kind date, in jQuery. $( "#ano" ).html($( "input[type=date]" ).val( ) ); <script…