Questions tagged as 'datetime'

1
answer

Set time zone for the entire project

I recently hosted an application on a North American server, so the dates are outside the Brazilian timezone. This way, I would like to know if there is a way to set the time zone only once so that every time you use DateTime.Now in a var...
asked by 18.07.2016 / 15:05
1
answer

Subtract days to current date with PHP [duplicate]

Hello, I would like to know how I can decrease, for example like this: $ current = '20 / 02/2016 '; $ dataSubtration = '18 / 02/2016 '; $ calc = $ currentTime - $ dataSubtraction; // As a result I wanted it to return number 2 (type, 2 days...
asked by 20.02.2016 / 23:52
1
answer

Convert string to calendar [closed]

I need to do a String to calendar conversion, so I have to set the value in a variable (which is in calendar type) in a class and then insert the data into a database! System.out.println("Digite a Data de Aniversario do Funcionario"); String...
asked by 06.03.2016 / 00:07
1
answer

Problem with Dates in ASP.NET MVC

In my model I have the following field: [Column("sdt_DataReferencia")] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")] [Display(Name = "Data Referência")] [DataType(DataType.Date)] public DateTime DataRefer...
asked by 07.03.2016 / 18:55
2
answers

Catch all the hours that are between the start time and end time with PHP

I'm developing a module and I need to get all the time between 2 hours, start and end . Example: <?php $hora_inicial = '08:00'; $hora_final = '15:00'; ?> Then you would have to list    08:00 09:00 10:00 11:00 12:00 13:00 14:...
asked by 28.07.2016 / 03:34
1
answer

View passing date to Model in wrong format

I am using Bootstrap-Datapicker as the date field on my form and globalizing with moment-with-locales . The configuration I used is as follows: $('.datetimepicker').datetimepicker({ locale: 'pt-br', format: 'L' }); T...
asked by 14.11.2015 / 21:41
1
answer

How to convert / Date (1533524400000-0300) / to PHP

I get a return from a JSON date in this format: /Date(1533524400000-0300)/ How to convoke a DateTime in PHP?     
asked by 08.06.2018 / 15:31
1
answer

How to convert a Decimal value to Datetime?

Can anyone help me with the following question? I have two return variables. Examples: 1st - type decimal ( vdecTotalHoras ) and a 2nd - also of type decimal ( vdecMediaAnalise ), both return date and time valu...
asked by 04.08.2015 / 17:24
2
answers

In php how to execute certain function after past X days of last execution

I'm developing changes and routines in a web application created in PHP and CakePHP, in case one of the routines would be a Component run every 15 days, to update an .html file As in PHP, do I check if X has been past days of the last execution...
asked by 01.08.2014 / 14:49
2
answers

How to get time difference between two DateTime variables in C #

I have two variables DateTime , which are DataCadastro and DataAtual(DateTime.Now) . I need to know if the time difference between these two dates is greater than or equal to 4 hours. Is there a method in the DateTime class th...
asked by 23.09.2015 / 15:28