Most voted "datetime" questions
A Datetime object in many programming languages describes a date and an hour of the day. It can express either an instant in time or a position on a calendar, depending on the context in which it is used and the specific application. This tag can be used for any question related to date and time.
Learn more…440 questions
Sort by count of
-
1
votes0
answers14
viewsORDER BY between two datetime columns
I have two datetime columns: data1 and data2. I need to sort by the shortest date between the two columns. If data2 is not zero, displays data2 line; If data2 is zero, displays data1 line; How do I…
-
1
votes1
answer97
viewsCompare current time with file values
I’m trying to get a list of schedules of a file (I already got), and schedule according to the time: purchase scheduled for 15:30, at this time I will run the purchase (API.Buy) # alimentação sinal…
-
1
votes0
answers61
viewsHow to preserve the date column by exporting a ts or xts object from R to excel?
I am working with a ts file with two variables compib <- cbind(pimsaf, fumosaf) head(compib) pimsaf fumosaf [1,] 77.74133 131.5189 [2,] 80.18227 131.6221 [3,] 79.77395 111.2698 [4,] 79.48862…
-
1
votes1
answer1672
viewsShow current date and time (real-time clock)
I want to display on the system screen the current/current date and time, which shows the clock incrementing seconds in real time. I’ve tried using the datetime.now (shows the date and time, however…
-
1
votes2
answers847
viewsHow many days a week do you have in a month?
Hello, good night! I did a lot of research on the Internet and found nothing concerning this doubt! I would like to get how many days of the week there are within a month using javascript! Example:…
-
1
votes0
answers211
viewsIncorrect Angular Brasilian time after daylight saving time
I have an application in Angular and need to display the correct time in the system, there was no change in daylight saving time in Brazil and I am informing the time in the system one hour late.…
-
1
votes1
answer79
viewsWrong timezone in JAVA
I’m making an application where I need to show in a graph the real time of the capture of a certain data I tested that code: SimpleDateFormat format = new SimpleDateFormat("hh:mm:ss");…
-
1
votes0
answers20
viewsWhy doesn’t Data Annotation recognize Datetime?
The view is not recognizing the date on formed {dd MM yyyy},ex:31/12/2020 . I’m already cracking my head for hours. *[Required] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString =…
-
1
votes1
answer46
viewsHow to convert 10:00:00 to 10
I’m making a program that calculates time and multiplies by a value. However, using the library datetime, i get time in format "10:00:00", and if I multiply by 14.00 it returns me an error, because…
-
1
votes1
answer360
viewsHow to format minutes using Java Localdatetime
I am beginner in Java and my doubt is in class LocalDateTime. The time is recorded at a certain point in the program. When I have write on the screen, appears like this: And I need you to come up…
-
1
votes1
answer64
viewsProblems using null coalescing
I’m having trouble using the null coalescing in the case below: When trying to use operand ?? to validate if the value reader["Data"] is void, and if the DateTime.MinValue. The error that returns…
-
1
votes1
answer38
viewsChange from day to month when adding minutes: Why does it occur? How to fix it?
I wonder why in the code below, after adding the 15 minutes, there is a change in the order of day and month. What’s the logic behind it, if that’s what I’m thinking. Plus, how to fix this in PHP…
-
1
votes0
answers60
viewsGood Practices and Use of Datetime in Viewmodels List
I’m making a system for the client, and he dismissed the use of fullcalendar, which would be practical. With this, I created in a table with the fields Agendaid(int), and Scheduling(Datetime) years…
-
1
votes1
answer827
viewsHow to run Python function every 1 minute, without using time.Leep()
Is it possible to run a function every 1 minute without using the.Sleep() team? I need to use the computer clock so that, whenever the clock reaches 1 minute, the function is executed. The.Leep()…
-
1
votes1
answer284
viewsReact Native useState create loop input
I have an object as follows: var ItensMenu = [ {title: 'Nome', type: 'input', id: 'id1'}, {title: 'CPF', type: 'number', id: 'id2'}, {title: 'Data de Nascimento', type: 'date', id: 'id3'}, {title:…
-
1
votes1
answer149
viewsSelect data according to a specific time
I am doing a program in which, given the day of the week, the hours and the current minutes, he responds with all the "Doctors" available at that time. Each doctor has a period of care. For example:…
-
1
votes0
answers10
viewsReplacing Datepickerandroid and Timepickerandroid by Datetimepicker, but I can not use
I’m doing a project of a course I bought, but in a certain class is used the DatePickerAndroid and TimePickerAndroid, that have been discontinued (including Timepicker no more). The code was as…
-
1
votes1
answer117
viewsProblem to fill date field with ASP.NET MVC, Razor
I’m making a mini registration system, it has the place to edit a client’s registration, when I click edit it comes the data in the fields for me to edit, all fields comes normal, except the field…
-
1
votes1
answer75
viewsHow to receive a list of parameters in a property correctly?
I’m using this widgets library: https://pub.dev/packages/flutter_rounded_date_picker The library makes it possible to disable certain dates within a calendar. Originally in the original documented…
-
0
votes2
answers85
viewsFormat Date in javascript for "from here to Xd Yh zm"
Friends, I am trying to format a date in javascript to stay in the following format: In x Days, y Hours, Z minutes. Only my code isn’t working properly: dt = dados[i].Hora - dataAtual; // o valor…
-
0
votes0
answers45
viewsTransforming American Data for Brazil in Js
I have the following date on JS : 2015-03-26T16:22-04:00 what code can I use to transform it into the Brazilian format?
-
0
votes1
answer297
viewsHow to convert Datetime type to nvarchar?
I have a table with a column like nvarchar, and I pass the following parameter to the stored Procedure: cmd.Parameters.Add("@PointDate", SqlDbType.NVarChar).Value = DateTime.Now; as predicted, I’m…
-
0
votes0
answers392
viewsWhy does my Playerprefs (Unity) not work on Android?
That’s my first question and first post here! Well, I’m playing a game on Unity android-facing and created a javascript to save and calculate some values. Here’s how it works: My game has some…
-
0
votes0
answers230
viewsConverting Date To Milliseconds
I’d like some help converting this function to the Cakephp standard. She takes the date from datetimepiker and turns it into milliseconds, but I’ve searched a lot and I can’t find anything similar…
-
0
votes1
answer78
viewsProblem defining 'allowTimes' in xdsoft Datetimepicker dynamically
Well guys, I have a problem here with the Datetimepicker. I’m trying to set the times dynamically accepted with the allowTimes attribute. To make it easier the code is asism:…
-
0
votes2
answers224
viewsDate Filtering - Month Verification 31 and February
I have the following code: Code example, must debug and follow the variable "lstItem" to understand its functioning using System; using System.Collections.Generic; using System.ComponentModel;…
-
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
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
votes2
answers229
viewsGet elapsed time from a string
I wanted to calculate the time now with what I get from a string like this: 2016-04-16T15:55:53Z But the time is three hours longer than our time zone, wanted some kind of exit: Já se decorreu 0…
-
0
votes1
answer644
viewsProblems when working with dates in the database using a maskedtextbox in dd/MM/yyyy format
I am using a Maskedtextbox in BR culture to force the user to fill in the date in the correct format (dd/MM/yyyy). I remove the Maskedtextbox string to insert into the database and record…
-
0
votes1
answer436
viewsFormat date to Brazilian format using webservices
How to format a data timestamp for timestamp br. ex. 2015-02-03 15:37:00 para 03/02/2015 15:37:00 Obs: the date is a text
-
0
votes2
answers482
viewsInsert time and time into database
I want to enter the time and date separately in the database, which have the fields timestamp and data, respectively. I have the following code on the insert button: SqlCommand sqlInsertCabecalho =…
-
0
votes0
answers43
viewsHow to get Datetime from the internet?
How can I do to get the current date from the internet, and convert the result to char *data_atual? Example of the intended websites: nist.time.gov and/or time.windows.com. I would like two…
-
0
votes1
answer758
viewsInsert date and currency data of a maskedTextBox into Mysql
When trying to enter the typed data of an object maskedTextBox, one of the date type and another of the currency type, in the Mysql database, where I have a table called test, created as command…
-
0
votes1
answer65
viewsSelect specific day in an np.array containing datetime
I have a np.array.astype('Datetime[s]') called T with several days at random times. I need to select a few days for separation. I tried to: for i in np.arange(MinTime,MaxTime,np.timedelta64(1,…
-
0
votes0
answers153
viewsWrite null Datetime field in Access base (mdb)
Good afternoon to all. Please I need your help. I am trying to record/update a Datetime-like Birth field, but not always this field will be populated due to business rule sometimes it will be null.…
-
0
votes2
answers307
viewsLoop in time interval
I need to go through an hour interval to assemble a grid with schedules. Example: range 08:00 to 10:00, adding 30 minutes. Forming a grid like this: 08:00 08:30 09:00 09:30 10:00 I’m trying like…
-
0
votes1
answer106
viewsFormat mysql table date and show in Smarty
I am developing a PHP page, using MVC structure and rendering tamplete files with Smarty. However, it was difficult to get a date via Mysql (see format: YEAR-MONTH-DAY HOUR:MINUTE:SECOND I would…
-
0
votes2
answers3045
viewsFormat PT BR date and time return in PHP
I’m using the function strtotime of PHP to format the date that come in the database SQL SERVER and is working normally on the local server, but on the web returns the date 12-31-1969 21:00 PM.…
-
0
votes1
answer57
viewsBootstrap style datetime does not work properly
Good morning, first I’ve seen researched several possible solutions to this problem here on the site, but the error it is giving me is different from the ones I found here, the file is pulling a…
-
0
votes1
answer68
viewsWhat is the most recommended and performative way to manipulate dates in PHP?
In PHP we can manipulate dates using functions such as date, strtotime, mktime etc. and from version 5.3 of it we can manipulate dates object-oriented with the classes Datetime, Dateinterval,…
-
0
votes1
answer53
viewsUnsolicited Truncation of Time
I have a model designed to record a time used in a task: public TarefaHoraPendente() { HorasAcumuladas = new TimeSpan(0, 0, 0); Pausada = false; } public int ID { get; set; } [Required(ErrorMessage…
-
0
votes2
answers169
viewsShow date in Messagebox C#
I have a date vector with the values already entered, but I wanted to show the values one by one, so I created a "for" that did this Dataavailable is my date vector, with values already allocated;…
-
0
votes1
answer525
viewsCapture visitor’s local time
Hello, for security reasons I need to pick the time the visitor of the page entered, but the system apparently is taking time from the server. IP: [XXX.XXX.XXX.XXX] Date: [03-07-2017 - 14:05:49]…
-
0
votes1
answer78
viewsTreat date correctly
I have an agenda where I am using the Fullcalendar library (javascript) and when I click on an event I want more information of this to be displayed so far everything right now I have a field form…
javascript html codeigniter datetime fullcalendarasked 7 years, 7 months ago Felipe Miranda De Lima 195 -
0
votes1
answer49
viewsError of datetime
I’m taking a date of two different dateTimes and concatenating into one variable, but when I write the content of this variable is as follows: Period: System.Windows.Forms.Datetimepicker, Value:…
-
0
votes2
answers154
viewsHow to remove Duplicate dates in sql?
Good morning, I need some help for the following problem, I have this code Which gives me the following result, but I’d like to remove the duplicate dates From now on, thank you.…
-
0
votes1
answer138
viewsDate subtraction today - start date in PHP and bring result ex: 1 day 5hs and 25min
I have 2 variables in PHP. The first is the order date $datarequested and the second is the date now $now. I need to list how long the order has been open. $datapedido is consulted in MYSQL. Both…
-
0
votes0
answers477
viewsCatch Hours by Datetime - Ionic 3
I need to do a project for my school and do not know how to pick, by ion-datetime (Ionic 3), the value of the times that the user select. Could someone help me?
-
0
votes1
answer3159
viewsQuery sql with longer and shorter date limit
My code should return values from the database, related to the current day (today), but only related to the month and day, I searched a lot but could not find something to help me $data_atual =…