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
votes1
answer454
viewsCreating a covariance program with Python
I’m working out a little bit with the lists and trying to create statistical operations with them and I’m having a hard time calculating the covariance Basically I’m trying to create separate…
-
2
votes3
answers95
viewsDate sequence from a range in R
Good morning, I have a base with ID, start date and end date. I wanted to generate a basis that each row be one day within the range with an ID column. Groundwork: base <- data.frame( ID =…
-
2
votes1
answer608
viewsConvert date from one format to another
I’m making an application for Android that uses the Apoid API of NASA. To do this, the user enters a date, and when clicking the button, a photo of the galaxy referring to the date typed appears.…
-
2
votes1
answer278
viewsCheck if a date is before or after other dates
I am using Java 7 and need to check if a date of birth is before or after certain dates. I’m doing like this: String str1 ="31/12/1960"; Date date1 = new SimpleDateFormat("dd/MM/yyyy").parse(str1);…
-
2
votes1
answer48
viewsCreating Date by passing numbers has different result from passing a string with the same values
I’m studying the dates part of Javascript and saw something I can’t explain. Follows the code: var envio = new Date(2018, 02, 20); var envio2 = new Date("2018-02-20"); console.log("Virgula: " +…
-
2
votes1
answer73
viewsI would like to edit my chart by displaying a single maximum value
Hello guys I’m having trouble displaying a value on my chart, it’s a graph of the evolution of the number of deaths in my city, my X axis is composed of March dates so far, and the Y axis with the…
-
2
votes1
answer46
viewsJavascript Difference between dates
I am making a script that needs to return the time (hh:mm:ss) between two dates. The first date is fixed, the second is the current date. Across of this post, can return this date difference (in…
-
2
votes3
answers342
viewsHow to make a sum in a loop for or while?
I need x to be added to 7 after the loop, but I’m not getting it, the code works perfectly if I do x++, is there any way to make that sum with 7? var x; for (x = dtdia + 2; x <= 31; x+ 7){…
-
2
votes1
answer46
viewsWhen trying to create date October 31, result is December 1
Today I went to visualize a graph that I have and I realized that it was all messed up but I didn’t understand why. I looked, reviewed, retested and no going back to normal. I’m guessing it’s a date…
-
2
votes2
answers53
viewsHow to change abbreviated values in a DF using Pandas in Python
I have the following problem, I have a df with more than 50 columns, in these columns, some have value of type "35,57B", "6,85T". How do I make iteratively and replace the examples cited above so…
-
2
votes1
answer58
viewsGet date from a string
I am trying to create a regular expression that returns some dates contained in strings. The formats are: dd/MM/yyyy dd-MM-yyyy dd/MM dd-MM Ex: public static void main(String[] args) { final String…
-
2
votes2
answers164
viewsHow to Formulate Pattern to Limit Date
I am developing a site where the user needs to search for routes of drivers of capacity, and in this research I want to limit the dates that he can use for example, at least the current day and at…
-
2
votes2
answers72
viewsHow to filter an array with Timestamp elements?
I need to create filters for a chart and I am using lib Highcharts only on the front. Data is being consumed from an API in an array of arrays like this: [ [ 1565308800000, 24960 ],[ 1565568000000,…
-
1
votes2
answers272
viewsSort by upload date after a readdir
I have this code that works fine, but I’d like the last images to be uploaded appear at the top of the page, instead of appearing in an order apparently 'Random'. They are not in a database, they…
-
1
votes1
answer397
viewsCorrections in Fullcalendar
I am trying to adjust the display position of the content within the first , the one that shows the Month/Day. I would like it to be displayed as: Day/Month, Ex: 23/08. I searched, but my lack of…
-
1
votes1
answer711
viewsWorking with date: print all dates in a given range
I am struggling with simple implementation. I need to receive the amount of days, excluding Saturdays and Sundays, from a certain date range. I tried using Calendar because I can set the day(date),…
-
1
votes1
answer150
viewsVFP - SQLEXEC is returning DATE field as CHAR
I am supporting a "legacy" application written in VFP, which uses DBF tables and now migrating to SQL Server. I created a test table in SQL, which contains fields of some basic types, to be able to…
-
1
votes2
answers10731
viewsGet date with day of week, number of week, month and year
Is there any way to get the date if you only have the day of the week, the number of week, month and year with Mysql? Example: I want to know what day it is with these parameters: Year: 2014 Month:…
-
1
votes2
answers768
viewsHow to format Yii date?
I need an example of how to change the date to the Brazilian standard.
-
1
votes3
answers30209
viewsSQL higher date of a record before the given date
Next is the following case: Tb_importacao [cod_titulo,data,imp_situacao] cod_titulo data_imp situacao 1 2015-04-10 1 1 2015-04-11 2 1 2015-04-11 1 1 2015-04-13 2 1 2015-04-14 3 1 2015-04-14 4 I need…
-
1
votes1
answer1073
viewsProblem showing date on Android
When displaying a date that has been entered in the database, of type DateTime, the app shows the current date: I’d also like to convert that date to dd/mm/yyyy to adjust to a portrait layout. Part…
-
1
votes1
answer994
viewsHow to convert to Database and check if a date is valid
How do I convert to YYYY-mm-dd and check if a date transmitted by a user via POST method is valid for my application?
-
1
votes1
answer392
viewsCURRENT_TIMESTAMP() inserting zeroed
I am inserting more than 9000 records via query, but CURRENT_TIMESTAMP() -3 is inserting several fields with 0000-00-00 00:00:00. Is there any way to avoid it? INSERT INTO yourls.yourls_url…
-
1
votes2
answers2831
viewsFormat date (dd/MM/yyyy)
I have here a column in a Datagridview with the name "DBO" (date of Birth) which has the format month/day/year, I wanted to change the style of the date to dd-MM-yyyy but I’m not getting it.…
-
1
votes2
answers557
viewsFormat date in Viewbag
I have a Viewbag returning two dates in a Dropdown, but they are returning with the same format that were saved in the database( MM/dd/yyy HH:mm:ss). I need them to return in the…
-
1
votes1
answer149
viewsLEFT JOIN mysql Filter non-existent records NOT IN
Good afternoon, what I’m trying to do is this: have two tables machines - stores copier location data ( address, zip code, etc ). readings - stores machine code, counters, datareading, etc I wanted…
-
1
votes2
answers753
viewsPut date in file generated by mysqldump
Hello, I want to date the file generated by mysqldump, I have a shell script that generates the dump, however I need to put the date that was generated in the file name Ex: //have this command…
-
1
votes2
answers271
viewsHow to render a String that is in this format yyyy-mm-dd HH:mm:ss.fff presentable
I have a date that is a return from the database that comes in this format yyyy-mm-dd HH:mm:ss.fff, how can I turn this into dd-mm-yyyy HH:mm Example: My date is like this: 2015-01-16 07:49:45.0 and…
-
1
votes1
answer1329
viewsComparison of PHP dates - dd/mm/yyyy
I’m looking to do a PHP date comparison of the type: if Datastart >= Datatoday + 3 days, do such a thing. Otherwise, do nothing. I tried something like this: if…
-
1
votes1
answer1173
viewsJavascript function to catch the next date of a calendar
I have several calendars registered in my database, each calendar has its particularity. I have a screen that makes the inclusion of a file and through a dropdown I choose the calendar that the…
-
1
votes1
answer271
viewsInsert current date in Database
I have a database with a table Noticias with: Id (Primary key and auto_increment) News (varchar, where I write the news) Date(where the current date has to be, only dd/mm/yyyy) but I never messed…
-
1
votes1
answer573
viewsAdd values from the database column
I’m making a reporting system and the bank will have, for example: > - visualizacoes | 300 > - clicks | 20 > - data | 2015-06-03 > - visualizacoes | 230 > - clicks | 3 > - data |…
-
1
votes2
answers155
viewsHow to modify unfilled date in the form for the current day?
I tried to do with isset, guy: $var1 = isset($_POST["namedocampo"]) ? $_POST["namedocampo"] : date('d/m/Y'); And with if, guy: if ($_POST["namedocampo"] == "") { $var1 = date('d/m/Y'); } But…
-
1
votes1
answer394
viewsDate format in PHP from SQL server
I am running the following code: $sql= mssql_query("select getdate()"); $res = mssql_fetch_assoc($sql); and he’s returning me the following date: 2015-04-10 32767:06 The time is five digits, someone…
-
1
votes1
answer513
viewsGoogle Chart - Showing different dates
I’m developing some test with the google Chart API. And I’m having a somewhat peculiar problem. Code data = new google.visualization.DataTable(); data.addColumn({ type : 'date', label : 'Day' });…
-
1
votes1
answer128
viewsData - date_trunc for PHP
Postgresql has a date function called date_trunc How can I play it in PHP? I only need the options: cond minute hour day week Month Quarter year…
-
1
votes0
answers618
viewsPhpexcel - Library automatically converts the notation of the date when importing Excel spreadsheet, from dd/mm/yyyy switches to mm/dd/yyyy
I’m going through a problem that’s already making me bald.. In a certain part of an application, I need to import the user’s data through an Excel spreadsheet, for this I am using the Phpexcel…
-
1
votes2
answers209
viewsPHP - Convert ISO8601 standard (used by Youtube) to seconds
I need to convert for seconds a time received in the pattern ISO8601, used by Youtube. Someone knows some function for this purpose? Exemplifying: If caught by the Youtube API the length of a video…
-
1
votes1
answer822
viewsQuestion on how to calculate time difference with special conditions
I’m trying to figure out the time difference between two dates using the Moment.js, but I need to observe some special conditions: Case 1: If you enter a day in a month, it already counts as "a…
-
1
votes1
answer1358
viewsHow to save and recover a date field in Sqlite3?
The point is that on the Sqlite website itself says that for fields date is to use numeric type or string, all right with numeric I write in the bank the date without special characters, however in…
-
1
votes0
answers238
viewsTo choose a date and get the week and enable select with specific values
I wonder if they can help me because I’ve been "cracking my brain" for days: Clicking a text input opens a calendar and then I choose a date; I need another input text to calculate the day of the…
-
1
votes1
answer42
viewsCheck 2 values after . (point)
I am developing a code where I have to calculate daily parking. In case the user selects for example: From: 05-11-2015 15:00 Until 06-11-2015 15:00 The value to be returned is 1, that is, 1 night.…
-
1
votes1
answer71
views -
1
votes1
answer71
views -
1
votes0
answers118
viewsSelect days within date for work shift assembly
I am in need of a function that will enter selected dates on Datapicker var date = new Date(); $('#pre-select-dates').multiDatesPicker({ addDates: [date.setDate(14), date.setDate(19)] });…
-
1
votes0
answers47
viewsProblem to convert date to Brazilian standard using JAXB
I’m having trouble converting xml to object using JAXB. The date comes in the format Sun Jan 30 16:08:23 BRT 18, and want to convert to Brazilian format 12-08-2009 16:08:23. JAXB Conversion Class:…
-
1
votes2
answers1136
views -
1
votes0
answers60
viewsString to Date conversion using an html form
I’m having trouble converting String to Date, here are the codes: Event: @Entity(name = "Evento") @Table(name = "evento_table") public class Evento { @Id @GeneratedValue(strategy =…
-
1
votes1
answer23
viewsHow to format a date in CDT?
How do I set a date in this format Tue, 3 May 2016 12:49:24 -0500 (CDT) look like this 03/05/2016?
-
1
votes4
answers103
viewsProblems formatting the date type returned from select
Good morning I would like you to help me with a small problem that I am trying to return from a select in php. I would like the return of my "Mes_ref" from my select to be only month and year…