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
votes1
answer1253
viewsDate and time expiration event - PHP
My question is the following: I created a function in PHP to check the current date and check the deadline for the end of a contest. Except that the end of this contest will have a specific time,…
-
3
votes3
answers428
viewsTest equal values (data) in PHP
Hello, I need to test if two dates are equal in PHP (current date x last working day of the month), the two are strings, but I’m not getting the result using the following code: if(strcmp($ultimo,…
-
3
votes1
answer388
viewsProblem with android conversion
I have a date that’s being returned from a Webservice like this: Sep 22, 2014 12:00:00 AM I would like to convert it to the following format? 22/09/2014 I tried some methods using the Date Android…
-
3
votes3
answers1361
viewsValidate different date formats
I am having difficulty validating different date formats. I need to convert the dates to the format Y-m-d to save in the bank. The dates come like this: 11/12/2014 // MÊS/DIA/ANO 30/10/2014 //…
-
3
votes1
answer71
viewsError restricting dates in SQL Server
I get 3 databases that are mounted in different locations, these bases come to me in text file (.txt) and I import to SQL Server. I’m making a query in which I want to restrict the records only for…
-
3
votes1
answer337
viewsSet date inside an Arraylist using Cursor
In a App finance the cursor has no type of getData or getCalendar. What to wear instead? public List<Despesa> getLista() { Cursor c = getWritableDatabase().query(TABELA, COLUNAS, null, null,…
-
3
votes3
answers1722
viewsIn PHP, does date() take server or user time?
I have a question about date, it takes the time from the server where my site is located or the machine the user is accessing? I’m taking a look at the PHP Manual but I couldn’t figure out which…
-
3
votes2
answers28630
viewsConvert Mysql data dd/mm/yyyy to yyyy-mm-dd
I have a database where I entered the dates in the format dd/mm/yyyy (example: 05/11/1987), but now I’m organizing some reports and need to update all dates in the database to the format yyyy-mm-dd…
-
3
votes1
answer147
viewsHow to convert a String of this type to a Date Object
I’m working with an Ontology at Protegé 4.1 and I have a Dataproperty that is a Datetime. I’m taking this Datetime this way: ["2015-06-30T16:38:53"^^xsd:dateTime] How do I put the date like this on…
-
3
votes2
answers5402
viewsCheck if day x falls on a Saturday or Sunday
I’m making a system that will be an Agenda, in this system has an option to repeat the commitment unless fortnightly, ie I save the commitment and the system will notify me every 15 days. But this…
-
3
votes1
answer174
viewsChange color of a Row when VB expires . Net
I have a database with the following tables: Data Emissão and Data Expira. So I want that when the date of Data expira is equal to or greater than Data Emissao, to row change color to Vermelho and…
-
3
votes3
answers7481
viewsCompare Two dates and time
Good morning guys, I’m trying to compare two dates but I’m not succeeding. I have 2 dates: dataAtual and dataPedido. What I want to do is that if the dateAtual is equal to datePedido and if the…
-
3
votes4
answers7937
viewsHow can I increment a day to a Java date?
What is the best way to increase a date of the type DD/MM/YYYY?
-
3
votes3
answers656
viewsCommands as. Date and srtptime in R
Suppose the following vector: datas=c("26/12/2014", "27/12/2014", "28/12/2014", "29/12/2014", "30/12/2014", "31/12/2014") When applying the commands as.Date(datas, "%d/%m%y") and strptimes(datas,…
-
3
votes1
answer50
viewsWhy does the for-loop convert from Date to integer?
Can anyone explain why in for-loop the objects Date are converted to integer? In the code below I want to iterate on the dates but these are converted to integers. > dates <- Sys.Date() + 1:10…
-
3
votes2
answers652
viewsConvert a date to Java
Good Afternoon. How do I convert a date into Java, taking into account the date entered may be day-month-year or year-day-month. I have the following code: data = toDate('2015-10-01'); function…
-
3
votes4
answers1125
viewsRun PHP function to insert data into DB daily at specific times
I am creating a "module" of my system and now I have to create a function that, when arriving at the time that is in the database, run a insert. For example, if the schedule is in the table 22:00,…
-
3
votes2
answers3878
viewsCatching first and last date of the previous month
I am using in Eclipse Selenium, for automatization of sending commands to a site, through JAVA files. On this site, I need to make a date query. I did so to test: element =…
-
3
votes1
answer87
viewsWhat is the best way to perform a descriptive analysis of birth dates in R?
I have in my data table a column of birthdates that are in the English model, but I don’t know how to analyze it descriptively nor what resources to use of the R. Should I use a bar chart or…
-
3
votes2
answers47
viewsUpdate date summing in bank
Good morning, you guys. I have in my database DATE fields for 'start date' and 'end date', so I can search for ranges. When I imported this data some dates were empty or inconform and were not…
-
3
votes1
answer2505
viewsHow to configure Postgres to accept date in PT-BR format?
Situation Let’s say I have one form in which the user fills a field date, DD-MM-YYYY. Question How can I do the postgres accept this format normally? No need to do to_timestamp('14/06/2016',…
-
3
votes1
answer1421
viewsPHP and mysql time count
Good night, I’m new here. A doubt I think is basic. I will create an "application" with PHP and mysql where I control the working hours of each collaborator with daily inputs and outputs. The…
-
3
votes1
answer86
viewsHow to calculate fixed date in php?
Guys, here’s the deal. I need a button to be released only after 8 o'clock on Sunday. For example, the client sends the file to the website. He can send the file on Sunday or Monday at any time.…
-
3
votes1
answer615
viewsDefault date to maturity - PHP
I’ve researched this issue here at the portal, and although there are similar questions, I haven’t found anything in the sense I need. On google also found nothing that exactly assists in my…
-
3
votes2
answers5474
viewsCalculate day difference between two dates [PHP]
Good afternoon to you all! I did some research before asking the question, but I did not get an answer to my question in any of them. I need help in getting the following code to receive both dates…
-
3
votes3
answers318
viewsChange the format of a date(time) in a String
I have two strings that receive hours, in this case, Arrivaltime and Departuretime. The format that comes is HH:MM:SS. I would like to format this string to HH:MM how can I do this? Insert this text…
-
3
votes3
answers996
views -
3
votes2
answers157
viewsCode error using switch and new date
I tried to do a function that would return the day of the week that we are, through a switch in JS, but somehow the result does not appear. I will debug all the code, but did not find the error.…
-
3
votes2
answers547
viewsFormat java.time.Duration for String
The code below is producing the following output: Resultado: PT2H30M I wish it were: Resultado: 2:30 Does anyone know how I can do? import java.time.Duration; import java.time.LocalDateTime; public…
-
3
votes1
answer467
viewsSQL/ORACLE Filter active records in the month
I have a table that records my records where a column records the data_inicial and another column to data_final. I need to generate a report where the user searches all records that were between the…
-
3
votes1
answer6191
viewsSum of hour+minute oracle/sql
Good afternoon, I have a table that stores times (hour:minute), I would need to group by date and add these intervals, for example day 01/03/2017 I have 04:35 of duration time. I tried a lot of…
-
3
votes1
answer659
views -
3
votes3
answers16319
viewsConvert from string to list?
I needed to pass a string of the kind: 0.4350 0.8798 0.0099 1 for a list [0.4350, 0.8798, 0.0099, 1] with a script simple. How can I do it?…
-
3
votes2
answers234
viewsHow to globally set the default date output in Laravel 5?
I remember well when I used the Laravel 4 that it was possible to convert globally the formats of created_at and updated_at, for display in JSON replies or even in direct call {{…
-
3
votes2
answers985
viewsProblem while recovering null data to a Datatable in C#
I am working with C# and the Postgresql Database, I have a field of type Date where it can be filled dd/mm/yyyy or null empty. the same problem refers to any field of the table, if it is empty, even…
-
3
votes2
answers3800
viewsLong or Date in JSON
Applications, one server and several customers, POST and GET to the server exchange objects JSON. One of the variables that goes along with the JSON is the datahora atual, see different Strings to…
-
3
votes5
answers23968
viewsHow to get and format current date and time?
I would like to know how to get the current date and time and then format them in JAVA. For example, I have these two values: 23062017 212010 I want to store each value in a variable, and then I…
-
3
votes1
answer442
viewsConvert java.util.date to java.sql.Date
With this line of code I can get through java.util.Date for java.sql.Date? java.sql.Date sqlDate = java.sql.Date.valueOf(String.valueOf(date)); Taking into account that date this format : Sat Jul 01…
-
3
votes2
answers2000
viewsGenerate and format dates with Moment in Nodejs
I’m trying to use the Moment for formatting dates this way YYYY-MM-DD HH:mm:ss and would like to determine a period between 00:00:00 yesterday and 23:59:59 today. Example: considering today as…
-
3
votes2
answers5347
viewsKnow how many years, months, days, hours, etc have passed since a certain date
I would like to know how do I make the output of the difference between two dates stay the way I want, in this case I would like it to be: Since 16 - 07 - 2014 23:00:00 passed: X years, Y months, K…
-
3
votes1
answer1179
viewsConvert data with Javascript?
How do I convert the date to this type 02 Ago 2017 for 02/08/2017? I’m using the vuejs-datepicker and when selecting it comes in this format, and the documentation says to do so...…
-
3
votes1
answer991
viewsCalculate age by taking a date of type Date
I’d like to calculate the age by taking the date of birth from the database, through the pojo. I was looking at how to do a date calculation, looking at this question: Calculate age per day, month…
-
3
votes1
answer253
viewsHow to calculate days, ignoring the hours?
How can I calculate if spent 1 day ignoring the hours. Explaining, it would be more or less like this: I have a date 2017-09-09 11:45:20, normally it would have been a day when the 11:45 the other…
-
3
votes4
answers7452
viewsFormatting date with Laravel
I’m unable to change the date format using the laravel 5.4 My model is like this: class Feriado extends Model{ protected $fillable = ['id', 'data', 'descricao', 'created_at', 'updated_at' ];…
-
3
votes1
answer1331
viewsHow to join two data.frames in R with different variables and out of order?
I have two date frames.: frame1 <- data.frame(dia=c("02/01/2017","03/01/2017","04/01/2017","05/01/2017"), y=c(2,2,1,2),w=c(4,4,2,2),z=c(25,16,24,30), k=c("sim","nao","sim","nao")) frame2 <-…
-
3
votes2
answers195
viewsCreate a calendar dimension with the month before Sys.date.
Hello, the scrip below creates a CSV with a Calendar dimension from the year 2015 to the current month. It turns out that I would like the function to return the month before the execution. Ex: If…
-
3
votes2
answers576
viewsExtract Date from a C#String
I need to extract two dates from a string that comes in the following format: string teste = "Aprovados por autorizantes da aplicação -> 02/03/2018 à > 02/03/2019"; This is the start date and…
-
3
votes1
answer2384
viewsAdd two or more covariables to the R
I have a database with several ID (rows) and in the columns the covariables. These covariables are repeated in other columns with different information about the same ID. How to join these…
-
3
votes1
answer1124
viewsConcatenate PHP date to insert into Mysql
Good morning, my doubt consists in the method of concatenation and creation of a Datetime to insert in a database. Having the variables: $dia = '2018-04-11'; $hora = '09:36'; The desired format is:…
-
3
votes2
answers1125
viewsDisplay default date field BR yyyymmdd to dd/mm/yyyy with javascript
hello i have a field that automatically receives a date from another system, but it sends me in American pattern, I would display on the screen with the default dd/mm/yyyy; <div class="form-group…