Questions tagged as 'datetime'

1
answer

Search in MySQL using only day, month or year with PHP

I created a table in a DATETIME field to store the day, month, year and time where a record is made. Would you like to know how I can search only by using day, month, or year? Example: I have 4 records: 2017-02-03 2017-02-13...
asked by 26.01.2018 / 16:19
1
answer

Problem with DateTime field in ASP.NET MVC POST

DateTime field getting 01/01/0001 00:00:00, not the date before POST.    DataTime Field with DataAnnotations (MODEL) [Required(ErrorMessage = "Campo Data de cadastro é obrigatório.")] [Display(Name = "Data cadastro")] [...
asked by 20.10.2017 / 16:32
1
answer

JSON Data format

Hello, I have a webservice that needs to fetch some data in the database and return a json object and I'm having problems with the date. here is the object import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.dat...
asked by 10.10.2017 / 22:11
2
answers

Date in Portuguese returning in English

I'm using this code to return the current date in Portuguese (locally): <? setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese'); date_default_timezone_set('America/Sao_Paulo'); echo utf8_encode(strftime('%A, %d de %B de %Y...
asked by 22.10.2017 / 16:13
1
answer

Converting E MMM dd HH: mm: ss Z yyyy for dd / MM / yyyy HH: mm: ss c #

I am getting the following date Thu Sep 01 00:00:00 BRT 2016 and need to convert to dd/MM/yyyy HH:mm:ss Only convert generates error, I am receiving this date via string of a System. Can anyone help me? DateTime dtPe...
asked by 29.11.2017 / 15:55
1
answer

Date subtraction today - initial date in PHP and bring result eg: 1 day 5hs and 25min [duplicate]

I have 2 variables in PHP. The first is the $ date request date and the second is the now $ date now. I need to list how long the request is open. The $ data requested is queried in MYSQL. Both are in the same format: ('Y-m-d H: i')....
asked by 30.08.2017 / 23:51
1
answer

DateTime error

I'm getting a date of two different dateTimes and concatenating on a single variable, but when I write the contents of that variable it looks like this: Period: System.Windows.Forms.DateTimePicker, Value: 20/07/2017 15:52:45 To System.Windows...
asked by 20.07.2017 / 21:03
2
answers

Show date in MessageBox C #

I have a vector of dates with values already inserted, but I wanted to show the values one by one, so I created a "for" that did this DatasIndisible is my vector of dates, with values already allocated; string mens; for (int i = 0; i <= 5;...
asked by 14.06.2017 / 03:49
1
answer

Bootstrap style datetime does not work correctly

Good morning, I've already researched several possible solutions to this problem here on the site, but the error it's giving me is different from the ones I found here, the file is pulling a strange formatting, and I can not find which element I...
asked by 10.04.2017 / 14:57
1
answer

Unsolicited Time Truncation

I have a model to write a time used in a task: public TarefaHoraPendente() { HorasAcumuladas = new TimeSpan(0, 0, 0); Pausada = false; } public int ID { get; set; } [Required(ErrorMessage = "Este campo é obrig...
asked by 07.04.2017 / 15:32