Questions tagged as 'date'

2
answers

Error in code using switch and new date

I tried to do a function that returns the day of the week we are, via switch in JS, but somehow, the result does not appear. I debugged all the code but did not find the error. Code: <!DOCTYPE html> <html lang="en"> <h...
asked by 14.12.2016 / 22:55
1
answer

PHP and mysql hours count

Good evening, I'm new here. One question I think is basic. I will create an "application" with PHP and mysql where I control the working hours of each collaborator with daily inputs and outputs. The doubt is the SQL just stores the data...
asked by 31.07.2016 / 05:43
2
answers

Picking the first and last date of the previous month

I'm using Selenium in Eclipse to automate the sending of commands to a website through JAVA files. On this site, I need to check dates. I did so to test: element = driver.findElement(By.name("form:dtEmissao_input")); element.sendKeys("01/04/20...
asked by 12.04.2016 / 16:30
1
answer

Why does the for-loop convert from Date to integer?

Does anyone know how to explain why for-loop objects are Date converted to integer ? In the code below I want to iterate in dates but these are converted to integers. > dates <- Sys.Date() + 1:10 > dates [1] "2015...
asked by 29.09.2015 / 03:25
4
answers

Formatting date with Laravel

I can not change the date format using laravel 5.4 My model looks like this: class Feriado extends Model{ protected $fillable = ['id', 'data', 'descricao', 'created_at', 'updated_at' ]; protected $dates = ['data'=> 'm-d-Y...
asked by 27.10.2017 / 04:06
2
answers

Problem retrieving null Data for a DataTable in C #

I'm working with C # and the PostGreSQL Database, I have a field of type Date where it can be filled in dd / mm / yyyy or empty null. the same problem is related to any field of the table, if it is empty, even if it may be, the error occurs....
asked by 22.03.2017 / 22:27
4
answers

Calculate date difference and start these days

I would like to calculate the difference of two dates and print all dates between them, for example: $data_inicio = new DateTime("08-02-2018"); $data_fim = new DateTime("10-03-2018"); ($dateInterval = $data_inicio->diff($data_fim); echo $da...
asked by 21.03.2018 / 13:12
3
answers

In PHP does date () get server or user time?

I have a question about date , does it take the time of the server where my site is or the machine that the user is accessing? I'm taking a look at the PHP Manual but I could not figure out which local method it refers to: machine or us...
asked by 19.05.2015 / 23:16
2
answers

Check if day x falls on a Saturday or Sunday

I am making a system that will be an Agenda, in this system you have an option to repeat the appointment except fortnightly, that is, I save the appointment and the system will notify me every 15 days. But this commitment can not fall into sá...
asked by 10.07.2015 / 16:36
2
answers

Convert MySQL data dd / mm / yyyy to yyyy-mm-dd

I have a database where I inserted the dates in the format dd/mm/yyyy (example: 05/11/1987 ), but now I'm organizing reports and I need to update all the dates in the database to the format yyyy-mm-dd 1987-11-05 ). How do I...
asked by 30.06.2015 / 18:39