Questions tagged as 'datetime'

1
answer

Globalize - datetime does not work with pt-BR

Please, follow code: Global.asax: protected void Application_Start() { System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo("pt-BR"); AreaRegistration.RegisterAllAreas();...
asked by 09.08.2017 / 03:46
1
answer

TimeSpan: count occurrences of a specific time

How could I assemble this method that counts the occurrences of a specific set of times in a period? public static int OcorrenciasDeHorarios( DateTime Inicio, DateTime Final, params string[] Horarios) { // ?? } Example: If passed...
asked by 27.01.2017 / 23:25
1
answer

How to display the date and time "at runtime"?

I would like to know how to display the current date and time of the computer, and the time must be updated at run time. I thought of passing an object to a label, but it did not. I will not save that date, I just want it to be displayed, I want...
asked by 04.02.2017 / 13:50
2
answers

Get current date / time AngularJS

I need to display on the page the current date followed by the current time, Here's what I've done so far, I just need to display the time if I continue as is, follow code: function dataHoje() { var data = new Date();...
asked by 15.04.2016 / 19:55
2
answers

Get elapsed time of 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 higher than our spindle, I wanted some output like: Já se decorreu 0 horas, 0 minutos e 0 segundos...     
asked by 16.04.2016 / 20:09
1
answer

How can I set the time pattern to UTC or GMT in PHP?

Several systems, large sites when it is possible to inform the time they ask for the choice of UTC or GMT. I already tried doing this in PHP, but I did not succeed using default_date_timezone_set() , how can I do this?     
asked by 19.04.2016 / 01:03
1
answer

Check 2 values after. (Score)

I'm developing a code where I have to calculate daily parking. If the user selects for example:    From: 11/5/2015 3:00 PM until 11/6/2015 3:00 PM The value to return is 1 , that is, 1 daily. If you select:    From: 11/5/2015 3:00 PM...
asked by 05.11.2015 / 17:52
1
answer

Calculate the time difference between two input time fields

What is the best way to calculate the difference of minutes between two input time fields with PHP? Example of two fields input : <label for="Cseg3">Horário 1:</label> <input type="time" id="Cseg3" name="Tsegs"...
asked by 17.04.2015 / 01:01
3
answers

Display DateTime field in View with hours, minutes, day / month / year?

How to manipulate datetime and show in view in the following format? HH:MM dd/MM/aaaa     
asked by 18.03.2015 / 14:37
2
answers

Insert time and time into the database [closed]

I want to insert the time and date separately into the database, which has the timestamp and data fields, respectively. I have the following code on the button that inserts: SqlCommand sqlInsertCabecalho = new SqlCommand("Ins...
asked by 22.04.2016 / 15:48