Questions tagged as 'datetime'

2
answers

Remove the time part of a date in C #

This is not working right here: DateTime? _data = calDataExclusao.Date; string nova_data = _data.ToString("dd/mm/yyyy"); The error is:    No overload for method 'ToString' takes 1 arguments How do I remove the time part of a date?  ...
asked by 08.12.2015 / 17:03
1
answer

Add 1 minute to hour

I have a problem solving an exercise. It may be easy but I can not seem to find the right solution. I have the following class Time public final class Time { private final int hours; private final int minutes; publ...
asked by 06.07.2018 / 00:34
2
answers

How do I get the values of a date in the format "dd / MM / yyyy hh: mm" and compare with system date after setting it in this same format?

I wanted to make a comparison between the date contained in the hour1 object with the system date, how can I do it? import java.text.SimpleDateFormat; import java.util.Date; public class MainTarefas { public static void main(String[] a...
asked by 18.06.2014 / 00:37
1
answer

Catch the time on a remote computer using C #

Is there any method for me to be able to retrieve the time and date from a remote computer using C #?     
asked by 28.09.2016 / 16:20
1
answer

Returns the previous month of a date entered in Qt

How do I return the previous month of the date reported in Qt, does it have any function in QDate that does this? I found only the one that adds addMonths . Example: Month 04 reported returns month 03.     
asked by 06.04.2015 / 17:46
1
answer

How to get timezone?

I have the following code: var minhaData = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, meuTimeZone); If meuTimeZone = "E. South America Standard Time"; then the value returned to minhaData is timezone -03:00...
asked by 22.09.2015 / 21:32
2
answers

How to format datetime in YYYY-MM-DDThh format: mm: ss.sTZD in Django / Python?

I'm having a difficulty in Django in returning the datetime at the local timezone. In Django I set USE_TZ=True and TIME_ZONE = 'America/Sao_Paulo' When calling timezone.now() , return the datetime with time in utc, I do no...
asked by 27.02.2015 / 02:56
1
answer

Formatting Time using initBinder

I need to get the time with the formatting "hh: mm" but it is not working, follow the error also to specify:    Whitelabel Error Page This application has no explicit mapping for   / error, so you are seeing this as a fallback. Tue Dec 18...
asked by 18.12.2018 / 17:00
2
answers

How to get a difference between two dates?

Let's say I have an initial date equal to 30/01/2014 10:00 and an end date equal to 02/02/2014 10:00 . I wonder if it's possible to get a grid containing these results: If possible, I would like to know how.     
asked by 21.02.2014 / 02:09
1
answer

time datetime.datetime.now ()

I'm doing a script where I measure the performance of a query in a database. The code is as follows: start = datetime.datetime.now() //CONSULTA AQUI end = datetime.datetime.now() print "Time taken: %s"%(end - start, ) The program returne...
asked by 12.01.2017 / 18:17