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
-
1
votes2
answers261
viewsHow to validate if one date is longer than the other considering day, month and year
I need to validate if the "Current Date" is larger than the "Due Date", but it seems that Moment.js only compares the days and does not take month/year into account. var dataAtual = moment(new…
-
1
votes2
answers292
viewsjava.util.Illegalformatconversionexception: d != java.lang.Integer
What’s going on here? I don’t think I can read the documentation from String format.(). For me this date/time conversion %td When receiving an integer within the interval of the day of the month it…
-
1
votes2
answers115
viewsHow to send a formatted Zoneddatetime in JSON?
I need to send the following: "tempo": { "inicio": "2019-06-24T20:00-03:00[America/Recife]", "fim": "2019-06-25T00:00-03:00[America/Recife]" } I created the two dates in my pojo: @Data…
-
1
votes1
answer92
viewsShow current date in a particular Timezone
I am trying to put on my site the local time of another city, through the data.timezone returned by the Open Weather API. This value is in seconds, for example, if the country has an extra 3 hours…
-
1
votes1
answer39
viewsError using local time as a condition
This method I use to validate the entry of a student, and it is not running. The idea is to use local time to validate a student’s entry. If he is from high school, can enter only in the hours…
-
1
votes1
answer32
viewsSimpledateformat am/pm format returns "afternoon" instead of "PM"
Using a solution to this question: https://stackoverflow.com/questions/6907968/how-to-convert-24-hr-format-time-in-to-12-hr-format In doing the following: Int hour = 13; SimpleDateFormat _24HourSDF…
-
1
votes1
answer24
viewsHow to compare two dates using input date and new date object in Javascript
I have two inputs of the kind date. One for the user to enter the start date and the other to enter a final date. I created a variable that receives the current date using only the new Date. I have…
-
1
votes1
answer72
viewsRegex for a valid YYYY year in java?
I am using these regular expressions for a future date check: Pattern padraoDia = Pattern.compile("([1-9]|0[1-9])|[1-2][0-9]|3[0-1]"); Pattern padraoMes = Pattern.compile("(0[1-9]|[1-9])|1[0-2]");…
-
0
votes3
answers2192
viewsIncompatible date format when importing data from Excel to Mysql (00-00-0000 VS 0000-00-00)
I am trying to import data from an Excel spreadsheet to Mysql, the problem is that I have a column in Excel that dates are in format dd-mm-yyyy and the format accepted by Mysql is yyyy-mm-dd. I want…
-
0
votes1
answer556
viewsHow to sort by date when day, month and year are each in a column?
Hello, I am with the following situation, I have to sort a table by date, but for some particular reason the programmer decided to save the day, month and year in separate columns, Obs the database…
-
0
votes1
answer2637
viewsValidate Date entered by Edittext
I have an Edittext with Mask to input a date. How can I validate whether or not the date exists? Code of my Edittext NascimentoUsu = (EditText)findViewById(R.id.edtdata_usu);…
-
0
votes1
answer41
viewsConversion of dates in the database
How to convert a date that is in format DDMMYYYY for YYYYMMDD? I am having problems to send this data to different SQL databases, considering that each one was elaborated in a way and are already…
-
0
votes1
answer237
viewsError while using Dateformat.Parse
I take the date and call the changeFormatDataTra private void makeJsonObjReq(){ showProgressDialog(); int id = ((AppController) this.getApplication()).getID(); JsonObjectRequest jsonObjReq = new…
-
0
votes1
answer733
viewsComparing dates of an array in PHP
I’m trying to compare the dates that come from a database array to be able to organize them within a timeline. The problem is that I can’t compare the dates to know where to place each entry...…
-
0
votes1
answer75
viewsQuery counting by date difference
I need to make a Mysql query that does the following: Count the number of times that the same record appears more than 15 days apart, i.e.: Record 1 - Date: 20/01/2015 Record 2 - Date: 22/01/2015…
-
0
votes1
answer995
viewsHow to compare age with date of birth in Javascript?
I’m having tremendous doubts. Don’t ask me why, but I have to compare the typed age with the date of birth typed to see if they match but I can’t. Please, anyone who can help me I appreciate.
-
0
votes1
answer633
viewsMaturity of dates
I have this code that validates the dates of a card and puts in the table: @SuppressWarnings("nls") public static ObservableList<String> getPagaVenci1(TableView<PersonC> jtc, String sq4,…
-
0
votes1
answer808
viewsCreate a start and end period with a list of days
I have an array of days and need to create periods based on it. For example this array 01/02/2015 02/02/2015 03/02/2015 04/02/2015 05/02/2015 09/02/2015 10/02/2015 11/02/2015 12/02/2015 Should…
-
0
votes1
answer1240
viewsHow to convert Time type to String?
I have a field horaConsulta and I can’t turn him into String DAO stmt.setTime(4, new java.sql.Time(consulta.getHoraConsulta().getTime())); Servlet Time horaConsulta =…
-
0
votes1
answer339
viewsHow not to select records that are within a date?
I have a table in Mysql with apartment, so: id | nome | data_ja_locado 1 | ap teste | 09/08/2015, 10/08/2015, 11/08/2015 So when the user does a search he wants to find apartments that are available…
-
0
votes1
answer42
viewsDecrypting date
I have a dashboard, and it encrypts the date, and I was wondering how I can decrypt it to show on my website. Encrypted date: 1437619904 I wanted to put it to the normal way.
-
0
votes0
answers37
viewsNo return when application goes to server
I am calling the following functions to pick up the current date and year: $mes = date("m"); $ano = date("Y"); It works when I’m in localhost, however, when I upload the application to the server I…
-
0
votes0
answers83
viewsJavascript - Filling Textbox with numbers, strings and dates in a boleto
I am trying to get a ticket filled automatically when selecting a row from a table. In this case, there are textbox (or text inputs) that must be filled with some values. My function is function…
-
0
votes1
answer70
viewsDate storage of the system
I need to capture the system date and store it in an entire variable, as I will need to compare it to a date that will be informed by the user. I found the function _strdate that stores the date on…
-
0
votes2
answers474
viewsIncomplete week name on strftime return
I am trying to print the day of the week, according to a certain timestamp, with the function strftime. I’m doing it this way: setlocale(LC_ALL, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8',…
-
0
votes1
answer399
viewsPerform a task on a specific date and time
I’m trying to develop a small system that sends a e-mail every Tuesday at 08:00 in the morning. But I’m a little confused, I can already send the email and check if it’s Tuesday, but I don’t know if…
-
0
votes2
answers366
viewsList all "date" attributes containing a particular code
I need to list all attributes data containing a code on their behalf (not in value). Example of HTML tag with attributes: <input type="hidden" id="products-end" data-flavor-id-15515-1="abc"…
-
0
votes1
answer1683
viewsCalculate percentage between 2 numbers
I have to do a percentage system where I have 2 dates in TIMEUNIX, being the final date ($cota->ultimo_recebimento) and the current day I catch up with the function time() from PHP. I tried to do…
-
0
votes2
answers47
viewsHow to pick the right date for the next event
I have a list of days of the week that shows when an event should occur and another variable with the interval that should occur that event, for example, if in the list is 0,1,0,1,0,1,0…
-
0
votes2
answers60
viewsDoubt Data with PHP and JS
Hi I don’t know anything about JS and I wonder if I can edit a field whose value came from the database using javascript? Because I saved in the bank the date of birth and the phone of a…
-
0
votes2
answers206
viewsSum int with date - PHP
I have the function below, which makes the date sum, with the value +2 days fixed: echo date('d/m/Y', strtotime("+2 days",strtotime($ultima_data))); It sums correctly with the value of $last date,…
-
0
votes2
answers739
viewsHow to add +10 whole seconds to date in a loop in PHP
I need the loop be executed 10 times, and that each loop the variable $tempo that has the date, hour, minute and seconds receive +10 seconds, but that in the final result is not displayed in…
-
0
votes2
answers6814
viewsGet current date/time Angularjs
I need to display on the page the current date followed by the current time, It follows what I have done so far, I only need to display the time if it continues as it is, follow code: function…
-
0
votes0
answers67
viewsUnknown characters in PHP date
I am trying a problem with unknown characters on the date of a site, I have put all the parameters I believed to remedy the problem, but it continues to happen. "Saturday, April 16, 2016" is coming…
-
0
votes1
answer42
viewsdate manipulation in postgresql
I have a database with several records, since 2001 until 2010. How do I select all tuples with dates after the day 2001-05-02? Data is of the type character varying(254).…
-
0
votes1
answer77
viewsProblems with MYSQL data
I have to make a query in mysql database but I have a problem in my query. In my bank I have 3 string fields, being a day, Month and year. These are not dates, but varchar. Ok. I can’t change that…
-
0
votes0
answers47
viewsHow do I make this function display the date in EN
How do I display the date in the Brazilian standard below for this function? I tried to use the function _i18n, but I don’t know how to use it properly. if ( ! function_exists(…
-
0
votes3
answers81
viewsWorking with date and deadline checks
I’m a logical problem in my application. Guys, here’s the thing, in the project module of my system there is a deadline for delivery of the project. I need to know the following. If today’s day is 1…
-
0
votes0
answers41
viewsinsert and update date values in DB using a makedtextbox C#
Hello, while I was developing a system to manage the records in DB error is happening that when entering the values the data records become empty and when trying to update the information listing it…
-
0
votes0
answers728
viewsList current week days with PHP
I have to make a calendar with PHP and is almost ready, the problem is just that for example, today (28/07/2016) the week in the calendar begins at 01/08/2016 and the right one should be 25/07/2016…
-
0
votes2
answers131
viewsFormat date written "ex. January 12, 2017" to default (Y-m-d)
It is possible to pass a date in this standard "January 12, 2017" to the American standard (Y-m-d) ? Some example? Thank you.
-
0
votes2
answers86
viewsHow to choose date in timestamp
I have the following line of code: round(microtime(true) * 1000) in order to catch the timestamp in milliseconds of the current time. I need to pick a future date, example, 10 or 5 minutes ahead.…
-
0
votes3
answers1541
viewsAngularjs Format date
As a data format in the input type controller="DATE"? i have this return in controller... Sat Aug 06 2016 00:00:00 GMT-0300 (Hora oficial do Brasil) Mon Aug 01 2016 00:00:00 GMT-0300 (Hora oficial…
-
0
votes3
answers1761
viewsHow to convert a String to Date on Swift
i receive the date as follows 2016-08-14T20:38:27.031-03:00 as string, I would like to pass to date on the standard dd/MM/yyyy, I have already searched the net some solutions however were not useful…
-
0
votes2
answers2104
viewsDoubt about RG - what is the best way to control the field?
I’m opening this topic to find out how you’ve been working with the issue of RG inclusion in forms. I think a common concern of all when working with forms is that the control of data is in our…
-
0
votes0
answers24
viewsIs it possible to make a $_Request[""] from an attribute other than name=""?
I wonder if it would be possible to make a $_Request[""] of the attribute of an HTML tag besides the name="". In my case it would be date-Fotocapa="test.jpg". Dai would request the date-Photo Cover.…
-
0
votes0
answers184
viewsAfter formatting the date appears with 3 hours more
earlier I had trouble transforming a String in date, with a lot of cost I managed to put in the exact time, but now when I went to generate the notification the blessed date appears with a few hours…
-
0
votes1
answer1320
viewsTranslate date long format from English to Portuguese
I’m converting a String to Date SimpleDateFormat dateFormat = new SimpleDateFormat("EE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH); Date convertDate = new Date(); String dd =…
-
0
votes3
answers9343
viewsCheck if a date is valid
I’m getting a date in format: string: "01/03/2010 23:00" How can I verify that this date is valid? By validity, disregard questions of days or months being with wrong numbers. The validation would…
-
0
votes1
answer407
viewsHow to get the date of a server instead of a local server?
I made the following form of license con.executaSql("select *from vencimento"); con.rs.last(); SimpleDateFormat df = new SimpleDateFormat("ddMMyyyy"); Date hoje = new Date(); String dataAtual =…