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
votes0
answers21
viewsSlow MYSQL query, when searching for date
I’m doing a date search on mysql, but it gets very slow (more than half a second). Is there any way to optimize this search to get faster? Ex: of consultation: SELECT dt.data,count(d.id) AS…
-
0
votes1
answer369
viewsProblems with correct return date with "new date()"
let dataSTR = '1988-03-01' let data = new Date(dataSTR) let dataTimestamp = new Date(dataSTR).getTime() console.log('[dataSTR]', dataSTR); console.log('[Timestamp]', dataTimestamp);…
-
0
votes2
answers217
viewsProblem passing Angular time to C# Core
The problem is to pass an hour value through an observable method (Angular 8) to a controller (C# Core 2.2), at the time of sending the data is correct: However, when I receive the values, it is…
-
0
votes1
answer336
viewsCalculate difference between dates (no time) with strtotime - use of date_default_timezone_set() gives different results
Example scenario I had a problem with a simple day count between 2 dates. One resulted me in 5 and the other 6, and was using the same dates with the same function, only in different files. The…
-
0
votes0
answers31
viewsInvalidpipeargument error when using Datepipe
I’m making an application in Angular and I’m trying to show a date, coming from the database, in a table. I have a database, as I mentioned above, which has a field for storing dates, like…
-
0
votes1
answer466
viewsHow to make a sequence dates in python?
I need to create a date array of 2018-01-01, 2020-01-11, the dates being nay can be continuous (eg 2018-01-01, 2018-01-02, 2018-01-03...) and include the ends. The closest I could get was: import…
-
0
votes1
answer57
viewshow to add days in javascript date
Hello, I’m trying to create a form to add days on the date to calculate the date of departure of the client but when I sum the formularies in a strange way and not give me the supposed date ie add 5…
-
0
votes3
answers381
viewsHow to remove hours from a Datetime string
I’m pulling a datetime record from my database and I’m formatting it to the traditional Brazilian format, however, I can’t remove the hours after the last value, always repeats the time. This is my…
-
0
votes1
answer43
viewsHow to compare datatime to a date
I have a problem in my login system, I want by validity system however I am not able to compare the current datatime with the received expiration datatime. I tried to use the following code and it…
-
0
votes1
answer531
viewsPython graph does not show all values on the x-axis
I used the pandas library to read a csv file and create a graph using matplotlib: import pandas as pd import matplotlib.pyplot as plt brazil_dataset = pd.read_csv('/content/states.csv') fig, ax =…
-
0
votes2
answers538
viewsUpdate in year without changing the month, day and time
I am trying to make a script to change the year of a table record where the dta_shutdown field has the date in the format of 08/25/2091 13:06:00 in Oracle database. I need to change the year 2091.…
-
0
votes1
answer24
viewsplotting plineplot with Seaborn excluding certain elements
I would like to plot a lineplot with sns but didn’t want it to plot a specific line sns.set_palette('Accent') sns.set_style('darkgrid') ax = sns.lineplot(x=dados['date'],y=dados['cases'],err_style=…
-
0
votes1
answer23
viewsMacro and VBA that deletes the oldest records, if they are the same value
Talk, guys, I’m new here and I’m desperate for some help. I need you to delete the oldest records from a list of multiple trips, keeping only the latest of them. The print below makes it clearer. In…
-
0
votes1
answer89
viewsGet last day of the week returns date equivalent to one more day
To obtain the first day of the week of the date 07/10/2020, I used the function startOfWeek of the date-fns library. Thus, returned 04/10/2020, which is right. const primeiroDiaSemana =…
-
0
votes4
answers1171
viewsHelp in Portugol (se e senao encadeado)
It was proposed by the teacher to perform an activity, that from a day, month and year entered by the user, the algorithm should verify whether it is a valid date or not. Consider months with 30 and…
-
0
votes0
answers39
viewsI need to make a report that brings the last sale of each product being in SQL
In this report I need to bring only the field with the last output of product X with the respective fields code, desc, client and etc have to do so, but the fields are repeated SELECT distinct…
-
0
votes1
answer449
viewsHow to run an INSERT Procedure with the GETDATE field? SQL Server
Next, I created a precedent that has two parameters Dt_inclusion and Dt_alteration, I would like to know how to insert(or if it is possible to use) a getdate to pick up the current date, instead of…
-
0
votes1
answer41
viewsWhy when creating a zoo series object the columns change from Numeric or integer to Character?
Good evening!!! I am confused enough. I will explain the pass-by-step until I get to the doubts that I finally could not solve: My goal is to create a file where tickers quotes are stored where each…
-
0
votes2
answers68
viewsI can’t get the right timestamp time
I have an API I’m consuming and in it I have the field timestamp worthwhile 1604327859 and with that value I have the following time and date: This value above is correct, I am using the Moment.js…
-
0
votes0
answers26
viewsSave time in format: HOUR:MINUTE using primefaces
I have a following problem, I want to save an entry time in which I type this time and I did this in xhtml: <p:datePicker maxlength="6" id="timeonly" showTime="true"…
-
0
votes3
answers131
viewsSubtract 1 month from a date string in the dd/mm/yyyy format
String data = "09/04/2021"; String charComeco = data.substring(0, 2); String charMeio = data.substring(3, 5); Integer meioTratado2 = Integer.parseInt(charMeio); meioTratado2 -=1;…
-
0
votes1
answer512
viewsSeparate Bar Graph - python [colab]
Staff how do I make the revenue and expense bars separate and not overlap on the chart? Thanks for being able to help. import pandas as pd import matplotlib.pyplot as plt #saldo em caixa no início…
-
0
votes1
answer61
viewsOracle SQL Query with Group By starting and ending on different days
I need to sum up grouped numerical records per day within a month, I have the timestamp of all records, but I can’t make a group by because my day starts with the 00:15 record and ends with the…
-
0
votes1
answer49
viewsSQL - How to bring only rows (ID and Date/time) with less than 1 hour
I need the following help: I have a table that I need to compare the transactions with the same ID, but only bring those ID lines that have the previous transaction with the same ID with less than…
-
0
votes1
answer65
viewsDisplay different message according to time
I need help to make it appear, according to the time I opened the page show Good morning, Good afternoon or good night, someone can help me? function carregar() { var msg =…
-
0
votes2
answers311
viewsHow to subtract 2 hours string
I’m doing a Java project in Android Studio where I have a database connected to a BD on a server. In one of the tables, I have 2 hours, hora_inicio and hora_fim that are extracted to string. I…
-
0
votes1
answer30
viewsUp to how many different levels can a classifier predict?
I was recently doing a machine learning model and I was wondering if I should use logistic regression. The documentation says that this classifier can predict binary values (0 or 1). In my case, I…
-
0
votes0
answers23
viewsHow to get the number of days between two Javascript dates?
Good evening! The database in which I work returns me two dates in milliseconds. How can I calculate the difference in days between the two dates? Example: Data1: 1619226924035ms Data2:…
-
0
votes0
answers36
viewsConvert Date Kotlin
Next, I get a data json from an api: "data": "2021-05-03T14:07:19.000Z" need convert to show user... I made my data class with her: Data : Date no Adapter called it with a function that goes back to…
-
0
votes1
answer86
viewsCalculation of Age using Period
I have this code below in Java that does not compile and I can not find the error. I have already made the targeted modifications and the number of errors has passed to only 1. The method…
-
0
votes0
answers22
viewsConversion of date to select
I have a little problem regarding the command I am using to create a report using the postgresql, this is the command: select DTNASCIMENTO from FRONT.CONTATO where contato.dtnascimento::DATE =…
-
0
votes0
answers21
viewsDate creation from a string
I’m trying to create a Date object from a string of type yyyy-mm-dd. Testing on a javascript console, for example: new Date("2021-06-20") The exit is: Sat Jun 19 2021 21:00:00 GMT-0300 (Brasilia…
-
0
votes1
answer14
viewspivot_table of frequency
I want to build a pivot_table on pandas that counts frequency. For example, I have a sex column, with 2 options, one of UF, with 5 options, and one of color, with 4 options, I wanted to make a table…
-
0
votes1
answer42
viewsscript where a given time and day of the week redirects the user to a specific page
I am trying to create a script so that one page redirects the user to another depending on the day of the week and the time. I found something, but it didn’t work: ` Function Checktime() { var…
-
0
votes1
answer1422
viewsConvert String to Date From yyyy-mm-dd to dd-mm-yyyy format
I made a Java endpoint that contains the date information. The date is received as string in the format 'yyyy-mm-dd'. I need to convert to Date dd-mm-yyyy format. I am using the following format…
-
0
votes0
answers23
viewsHow to convert this date string "2021-09-22T09:00:00" into standard format
I get that string in a request "2021-09-22T09:00:00" I need to turn her into this pattern with 22/09/2021 09:00 javascript Can someone help me? I need a regex to modify…
-
0
votes1
answer105
viewsFormat database date for javascript
I am mounting a table on the datatables with date and time information. But the data comes in the database in YYYY-mm-dd default. How do I change and show in datatable as dd/mm/YYYY? My code:…
-
0
votes1
answer279
viewsSql Server - Time Conversion (HH:mm) to Decimal
Hello, I am working on a system that requires conversion of hours to decimal and is showing error conversion from HOUR (HH:mm) to decimal when total hours exceeds 23:59. For better understanding if…
-
0
votes3
answers389
viewsHow to get the date of the first and last days of the current week with Javascript?
I need to get the date of the first and last days of the current week. For example, we are in Christmas week, and I would like the function primeiroDiaSemanaData() return 20/12/2020 and the function…
-
0
votes0
answers9
viewsmediaElement does not work on jlPlayer
hello I’m using the using the jlPlayer and I have this video code: <video preload="none" class="jlplayer-video" id="MY_VIDEO_1" onended="refresh()"> <!-- <track kind="captions"…
-
0
votes2
answers28
viewsData Calendar updating alone
I have a method in the application where I add the service date the warranty time the customer has. To execute the method I return from the database a list with all sales/services performed and when…
-
0
votes0
answers17
viewsQuery that returns the difference in hours between two dates considering working days - MYSQL
I have a demand where I need to generate a query that returns the amount of existing records in a table, given the difference, in hours, between two dates. The difference between the dates I can…
-
0
votes0
answers74
viewsHow to format a date in Brazilian Javascript format?
How do I format a date for the Brazilian standard in Javascript? I looked in several places but I could not get the date to be displayed in the Brazilian standard. Summary of the problem: How the…
-
0
votes0
answers14
viewsfullcalendar date start error in google Chrome
Since the day 26 seems to be a fault in the google Chrome schedule. I found this using whatsAppWeb:…
-
0
votes0
answers74
viewsHow to format a date in Brazilian Javascript format?
How do I format a date for the Brazilian standard in Javascript? I looked in several places but I could not get the date to be displayed in the Brazilian standard. Summary of the problem: How the…
-
0
votes0
answers16
viewsHow do I calculate dates to not allow smaller dates than the current day?
I am making a business rule in which the customer’s checkin can never be less than the previous day. but I’m just finding the difference between days, and in this case the values are the same for…
-
0
votes0
answers19
viewsFind existing days between two predefined dates
I am implementing a system of calendars used for marking warnings in PHP with Codeigniter. I would like to know how I can pick up every existing day between two predefined dates, for example: //…
-
0
votes1
answer56
viewsSubstring to format date within MAX and MIN
Greetings, I have this query and need to return the maximum and minimum value of a column of a table. These values are date and are written in YYYYMMDD format, I would like to display them in…
-
0
votes0
answers17
viewsPostgresql - Automatic date return from another data field
good afternoon! I’m trying to create a Rigger that returns the automatic date from another date field. Type insert in one field this date and in the other return 730 days ahead. In this case, I have…
-
0
votes4
answers143
viewsShow days of the week
I built this code to show the day of the week. It works, but I wonder if there is another way with fewer lines/commands I could use. Or a more 'clean' way so to speak. import datetime # Pega a data…