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
-
0
votes2
answers834
viewsDate in Portuguese returning in English
I am using this code to return the current date in English (locally): <? setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese'); date_default_timezone_set('America/Sao_Paulo');…
-
0
votes0
answers137
viewsLINQ Dynamic from DTO - Datetime Filtration
I’m trying to assemble a dynamic filter from a Dtofiltro object that I get filled through the View. My problem is, when I try to filter the results that will be shown on the screen by Mesano, I…
-
0
votes1
answer1302
viewsDatetime UTC Opening hours NF-e
How can I change the time zone of a type variable DateTime? The idea is to make a routine where the user does not need to change the time of the computer to perform NF-e transmissions, but is…
-
0
votes0
answers1488
viewsHow to format date in UTC format for yyyy-mm-dd
I am working with the XML of an NF-e where the date fields are in UTC format (YYYY-MM-Ddthh:mm:ssTZD) and need to insert them into the database in yyyyyy-mm-dd format. I’m using Simpledateformat to…
-
0
votes1
answer3709
viewsJSON Data format
Hello personal I have a webservice that should fetch some infections in the database and return a json object and I’m having problems with date. here is the object import…
-
0
votes1
answer867
viewsView day of the week as date used in PHP query
Good afternoon everyone, I’m having a question on a course project. I have a form where I look for scheduled patients on a certain day of the month. When I perform the appointment to present the…
-
0
votes1
answer2368
viewsHow to go back days on datetime, python?
I need to return a string in the format "dd/mm/yyyy" in python, I got through the library datetime. import datetime date = datetime.datetime.now().strftime("%d/%m/%y") But I also need the date 7…
-
0
votes1
answer346
views@Datetimeformat with daylight saving time error
I’m having a problem converting date of day 15/10/2017 (start of daylight saving time) My mapping is like this: @Column(nullable = false) @NotNull @DateTimeFormat(pattern = "dd/MM/yyyy") private…
-
0
votes1
answer919
viewsDate handling problem in an ACCESS/VBA application with SQL Server database
I needed to migrate the database of an application made in vba using access. The database was native to access and passed to SQL Server. In access, as everything is native everything worked…
-
0
votes1
answer587
viewsDatetime field problem in POST ASP.NET MVC
Field Datetime getting 01/01/0001 00:00:00, and not with the date before the POST. Datatime Field with Dataannotations (MODEL) [Required(ErrorMessage = "Campo Data de cadastro é obrigatório.")]…
-
0
votes2
answers64
viewsCellclick event, does not return Datetime value
I’m recording some data on DataGridView and in the Event CellClick should fill in the DateTimePicker with the value already registered, but I’m doing something wrong. Buttons: record, edit, delete…
-
0
votes1
answer144
viewsUnix Time for Tdatetime
I need to convert a received time into a json in the format 750382 for 00:12:41 in Delphi has the function Unixtodatetime() but it only works if I receive the full date and time, but in this case I…
-
0
votes0
answers67
viewsPostgresql compare time between two hours, and if it exceeds the hours of the day, limit up to 23:59
I’m making a query sql in the ruby-on-rails for PostgreSQL where I check if the user input is between hora_entrada and hora_entrada + (hora_entrada + limite_banco_horas) and the same goes for…
-
0
votes1
answer44
viewsHow do I manipulate team values in my JS?
I need to perform a calculation with input values like time in my JS using jquery, how do I do that? is there any library ready? <label for="">Inicio</label> <div…
-
0
votes1
answer158
viewsJava createNativeQuery Insert datetime
I’m trying to insert into a bank whose dates are datetime2(7). SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); Query u = em.createNativeQuery(insert); u.setParameter(1, sdf…
-
0
votes1
answer554
viewsDate and Time Form - Angularjs
I have a form with the option to choose date and Time. I’m using the Datepicker and Timepicker components. <!-- Date --> <div class="col-xs-12 col-md-3 col-lg-3"> <div…
-
0
votes1
answer150
viewsGraphs highcharts plotting the dates which are the values valid for the month
I’m charting a graph that the date entries don’t match with the plotting. Example when I enter the date information 10/12/2017 it plots how (January 10, 2017) to correct this? Loading is done…
-
0
votes0
answers77
viewsI cannot compare dates with Datetime() in PHP
I have a form where I send the date 1-4-2017 in each separate field(day, month and year). The code below receives the date normally, but when it arrives at the part of the comparison it does not…
-
0
votes1
answer51
viewsSearch in Mysql using day, month or year only with PHP
I created a table, in it a field in the format DATETIME to store the day, month, year and time in which a record is made. I wonder how I can do to search only using day, month or year ? Example: I…
-
0
votes1
answer409
views -
0
votes1
answer96
viewsSql. table, organized date and time
I have an sql table that will contain appointment, date and time. I keep the three based on ID. I have a question about the date and time id = 0; data 28/08/2018 - 13:11h id = 1; data 26/08/2018 -…
-
0
votes1
answer147
viewsHow to increment +1h between two dates using php?
I have the following code that receives from the user an initial date ($dtStart) and another final date ($dtEnd). The goal is to query every hour in mysql between these two dates. I need to control…
-
0
votes1
answer42
viewsDisplay automatic date sequence
I have a question about Datagridview: I’m making a payroll system, in that system I have to bring the first day of release and the final day. The problem is that, for example, I need to make a…
-
0
votes1
answer50
viewsGet the time on from an Excell spreadsheet
I am using the POI api in Java. To get the time in an excel spreadsheet. In the Excell worksheet the given is as text image: public void obterHora(){ Cell hora = row.getCell(7);…
-
0
votes1
answer672
viewsHow to convert date time to ISO 8601 format in PHP?
I have the following format: 2018-10-23T12:05:18.18UTC0TUE I need to turn into 2013-06-28T08:54:00.000-03:00 (iso 8601 format). There is something specific in php that helps me to transform this…
-
0
votes2
answers3264
viewsConvert the timestamp result to the formed Date and Time
I need to convert the timestamp result (eg 121242343543) to the format 2018-11-09T16:36:01. Controller.js: function salvar() { var dataBase = new Date().getTime(); // salva no banco var simulacao =…
-
0
votes0
answers34
viewsConstant error in the use of strptime
Expensive, I always worked with strptime without major problems, but a mistake started to appear that I did not find in any quote: from datetime import datetime a = "20160228" date =…
-
0
votes1
answer1180
viewsSort Datetime from a Datatable
I am having problems ordering Datetime field from a Datatable, I am returning records from my table users via server-side. The problem is time to click on the label of a column of the type Datetime,…
-
0
votes1
answer174
viewsWrong date format
I have a problem and I have no idea how to solve, it is the following: The date on a system I am modifying does not show in View correctly. Is this way: 0404/0606/2018181818 9:56:19 AM Where should…
-
0
votes1
answer52
viewsAs popular dropdwonlist with datetime AM value and another dropdwonlist with PM C#
Question: As popular a dropdownlist worthwhile datetime AM and other dropdownlist with PM value in C#. private static void FillTimeDropDown(DropDownList dropDownList) { TimeSpan startTime = new…
-
0
votes1
answer3684
viewsHow to calculate 'end time' in Python?
qpd = int(input('Quantidade produzida: ')) # qpd = Quantidade Produzida qpg = int(input('Quantidade programada: ')) # qpg = Quantidade Programada qrs = qpg - qpd # qrs = Quantidade Restante qpc =…
-
0
votes1
answer341
viewsSet timestamp field to accept value 0000-00-00 00:00:00
I’m in the wrong postgres, because a field that is timestamp this receiving value '0000-00-00 00:00:00', can tell me how to set up a field timestamp accept date and time reset ? Follows error:…
-
0
votes0
answers56
viewsCarbon producing inconsistent results
Correct $datSuspensao = Carbon::parse($objAlt->dat_inclusao)->addDays(8)->startOfDay(); $datNow = Carbon::now()->startOfDay(); $diasRestantes = $datNow->diffInDays($datSuspensao,…
-
0
votes0
answers143
viewsHow can I write a Datetime-Local HTML input to the database with the Datetime type Field?
In the project I am developing in PHP I need one in a registration form. I wanted to know how I can save this data in the database, I tried to use the type Datetime in MYSQL, but this type has the…
-
0
votes1
answer67
viewsTimestamp or datetime calculate Lifetime/diff (php)
Hello, I’m trying here how to do for this value "147878163" be converted to "1 day 17 hours 15 minutes" for example Apparently it’s timestamp, but this value is different from what I usually use,…
-
0
votes2
answers443
viewsDisplay date correctly on a Jtable
I am unable to display the sql database date type Date in Jtable, the date appears that way: I use the following method to call the table data: public ArrayList<Alunos> read(){…
-
0
votes1
answer139
viewsError with date time
Guys I’m trying to run my code, I’m having the following error: Typeerror: 'datetime.date' Object is not subscriptable How do I fix it? follow my code below: def making_date(self, *args, **kwargs):…
-
0
votes1
answer1130
viewsHow to use Tformatsettings in Delphi 10 Tokyo?
How do I set regional date, time, decimal separator, mile separator settings in Delphi 10 Tokyo? Previously, in Delphi 7, there were global system variables. In newer versions they created the…
-
0
votes2
answers92
viewsError doing Insert in BD SQL using JDBC
I need to do an Insert using JDBC Connection, but inserting generates the error below. com.microsoft.sqlserver.jdbc.Sqlserverexception: Conversion failed when Converting date and/or time from…
-
0
votes1
answer77
viewsHow to store and display time only? C# Mysql
I need to take an input time and an output two textboxs, store in the bank and later display, my code is like this: //Cadastro //No evento do botão cadastrar entradaSaida.HrEntrada =…
-
0
votes1
answer42
viewsHow to insert year by year into a time series graph in ggplot?
I’m running the remote ggplot(Regulation, aes(Regulation$year, Regulation$rqe)) + geom_line() + geom_point(Colour = "blue")+ Labs(title = "REGULATORY QUALITY ESTIMATOR (1996-2017)", x = "YEAR", y =…
-
0
votes2
answers420
viewsCreate a PHP Array with values from months past the year Using the Carbon API
I need to create a chart of reports from the beginning of the year to the present day. And my idea is to use a line chart that shows each month the value of a report defined by myself. Example: in…
-
0
votes1
answer33
viewsIn PHP using datetime.format what is the meaning of %a
I’d like to know what the meaning of %a used in Data time in PHP, the others found here: %Y Anos, %m Meses, %d Dias, %H Horas, %i Minutos, %s Segundos Would be the a in the table of PHP manual?…
-
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
votes0
answers25
viewsSet a Datefields Arrayfield
I need to store several dates in a Django model (I’m using version 2.1), I was able to create several fields, thus: date1 = models.DateField(null=True, blank=True, verbose_name="Data da parcela 1")…
-
0
votes1
answer122
viewsDatetime field is null when switching to controller
I have in my application a search form using Ajaxbeginform. In the same I own a data field (Datetime), and in which I am using the bootstrap datepicker. My form looks like this: @using…
-
0
votes1
answer219
viewsHow to take only the time of a Timestamp
Using the command below: pd.to_datetime(1490195805, unit='s') The return is: Timestamp('2017-03-22 15:16:45') How do I extract only the time: 15:16:45?…
-
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
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
answer77
viewsProblems with Datetime in Javascript with C#
Staff I have a class that gets a start and end date from a Javascript: public object getTime(DateTime inicio, DateTime fim) { ... } I’m going through the dates like this through Javascript:…