Questions tagged as 'datetime'

2
answers

Error formatting string for datetime python

I'm trying to format a string with the format "2018-05-09T05: 05: 34Z" to "05/05/2018", but given the error ValueError: unconverted data remains If I use: dataAntiga = "2018-05-09T05:05:34Z" datetime_object = parser.parse(dataAntiga)...
asked by 04.06.2018 / 03:44
3
answers

operation with date sqlserver

Gentlemen, I'm migrating my system from Oracle to SQL Server, I'm having trouble doing the following operation SELECT CASE WHEN (EPL.DAT_VENCIMEN - EPL.DAT_FABRICA) > 0 THEN CAST(((CAST(SYSDATE-EPL.DAT_FABRICA AS INT)) /...
asked by 11.10.2016 / 16:21
2
answers

Filtering by dates - Verification of months 31 and February [closed]

I have the following code: Example code, you should debug and follow the "lstItem" variable to understand its operation using System; using System.Collections.Generic; using System.ComponentModel; namespace TesteRotina { class Progra...
asked by 18.11.2015 / 14:10
1
answer

How to go back days in datetime, python?

I need to return a string in the format "dd / mm / yyyy" in python, I got through the datetime library. import datetime date = datetime.datetime.now().strftime("%d/%m/%y") But I also need the date 7 days ago, a week earlier.     
asked by 02.01.2018 / 13:14
1
answer

How to convert date time to ISO 8601 format in PHP?

I have the following format: 2018-10-23T12:05:18.18UTC0TUE I need to convert to 2013-06-28T08:54:00.000-03:00 (format iso 8601). Is there anything specific in php that will help me make this datetime? What would this 00...
asked by 31.10.2018 / 20:41
2
answers

Display date correctly in a JTable

I'm not able to display the sql database date type Date in JTable, the date appears like this: Iusethefollowingmethodtocallthetabledata:publicArrayList<Alunos>read(){PreparedStatementstmt=null;ResultSetrs=null;ArrayList<Aluno...
asked by 27.11.2018 / 20:42
1
answer

How to increment + 1h between two dates using php?

I have the following code that receives the user a start date ( $dtStart ) and another end date ( $dtEnd ). The goal is to do an hourly query in mysql between these two dates. I need to control the process in a loop in php (becaus...
asked by 02.03.2018 / 21:46
1
answer

Display day of the week, according to the date used in the PHP query

Good afternoon everyone, I have a question in a course project. I have a form where I look for patients scheduled on a particular day of the month. When I perform the query to present the scheduled patients, I must also present the day of the...
asked by 20.12.2017 / 19:05
1
answer

What 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 , and so on. and from version 5.3 of it we can manipulate dates in an object-oriented way with the DateTime , DateInterval , DatePeriod classes, and so on. >...
asked by 01.04.2017 / 16:52
1
answer

Capture visitor's local time [duplicate]

Hello, for security reasons I need to get the time the page visitor entered, but the system apparently is taking the time from the server. IP: [XXX.XXX.XXX.XXX] Date: [03-07-2017 - 14:05:49] (Local time 11:05) I'm using the following cod...
asked by 03.07.2017 / 16:06