Questions tagged as 'date'

1
answer

Check if date is even or odd

I need help with dates in SQL Server. I have a date field and would like to know if this date is odd or even. I need to make this comparison to use in another field. I looked for some methods but I did not get the solution. I thought about us...
asked by 14.12.2018 / 12:44
1
answer

How to leave the negative operator after using diff () in php

Good afternoon. I do not know if it was very clear but the following, date_diff() , the problem is what, when I convert the interval $intervalo = date_interval_format($resultado, '%a') if the result is less than 0 the number is posi...
asked by 23.12.2018 / 18:24
1
answer

Angular Format-date with date decreased by one day

I'm using an angular directive to handle dates My policy is this: app.directive("formatDate", function() { return { require: 'ngModel', link: function(scope, elem, attr, modelCtrl) { modelCtrl.$formatters.pus...
asked by 19.02.2018 / 19:13
1
answer

Receive date and time without tabs and convert to date format

I would like to have the date and time in php, like this: Example: I would like to receive this date as follows: 09092017104430 And I would like the output to look something like this: 09/09/2017 10:44:30     
asked by 09.09.2017 / 16:43
1
answer

How to save a localdate in a mysql table?

I have a table book that has a column of type "Date" and in my java code I have a field of type "localdate". I need to save the data from the "LocalDate" field in the table however I am finding it difficult to do this, any suggestions? Java:...
asked by 25.06.2017 / 20:52
2
answers

Problem converting String to Date

I have a project to do and I can not convert String to Date . I want to compare the current date with the date of the query that is in the textField Date , and if the current date is past the marked date, it means that the query ha...
asked by 29.11.2016 / 18:14
2
answers

Print the next days after the 18/01/2016

I have to make a code where I put a date and I need to know what the next 5 days are. For example, today is 18/01/2016 the next few days are 19/01/2016, 20/01/2016, 21/01/2016, 01/22/2016 and 23 / 01/2016 . I need to pick up the next 5 days o...
asked by 19.01.2016 / 02:08
2
answers

Get start date and end date of a week of the month

Good afternoon, guys. Today I have a problem getting the start date and end date for a week of the month. Let's break it down: I have a combo that brings me the weeks of a month posted. To know how many weeks I have in January 2015, for ex...
asked by 20.07.2015 / 20:14
1
answer

Date Range VARCHAR / DATE

I have a date field of type (type VARCHAR ) in my table, and I recently had to search the database with date range. And for this I used the Between operator, getting something like: BETWEEN 15/08/2015 AND 25/08/2015 . So go...
asked by 27.09.2015 / 01:30
2
answers

Difference between two dates in PHP in months of 31, 28 and 29 days

I have a bonus system that only frees the bonus after 30 exact days of the user's registration. To compare the current date with the user's registration date so that I get how many days left to complete 30 exact days, I use the following code...
asked by 03.06.2015 / 03:57