Date-difference will give difference in the number of days, months, years etc. between any two calendar dates. (synonyms in stackoverflow.com: datediff, date-diff, date-difference)
Questions tagged [date-difference]
446 questions
-3
votes
1 answer
Getting the Difference between a date and system date android
I am trying to achieve a functionality for a membership App but am find some difficulties working with Dates.
I retrieve a startDate from the DB which comes as "YYYY-MM-dd".
What I wish to achieve is to calculate the difference in day from the…

Wolfgang
- 1
- 1
-3
votes
3 answers
SQL Select Where Date <= To date
Hi I am a newbie in SQL syntax.
I would like to have a query results in SQL using the below syntax.
Select * from tblSales where duedate <= todate
But when i run it was an error.
Please advise me for the correct syntax.
Thanks

Daryl
- 35
- 1
- 7
-3
votes
2 answers
Days difference by counting midnights in swift
I have an objective-c exsample how to count a days diference as number of midnites, published in Apple's "Date and Time Programming Guide". Is it posible to do the same in Swift?
@implementation NSCalendar…

nikolayDudrenov
- 159
- 2
- 9
-3
votes
3 answers
Difference between two times in android
I want to get difference between two times. I calculate this by using following.
using this
But i want to calculate three difference. For example i have 6 TIME as following.
time1, time2, time3, time4
And I want to calculate difference between two…

Hardik Joshi
- 9,477
- 12
- 61
- 113
-4
votes
3 answers
Check difference between 2 dates in t-SQL
Best method to check between 2 dates to see if they are within exactly 3 months of each other using T-SQL.
For example if I had these 2 dates below I want to check if @Date1 is within 3 months of @Date2 and vice versa.
DECLARE @Date1 DATETIME =…

Joe M
- 107
- 2
- 2
- 7
-4
votes
2 answers
Backward alternative solution for ChronoUnit.Days.between()
I need an alternative solution for ChronoUnit.Days.between() that works for Android version prior to API 26.
Please!

Ikemefuna Nwodo
- 101
- 1
- 2
- 7
-4
votes
1 answer
Algorithm for getting the Age and the leap years since birth
calculate the total number of leap years IN DAYS since his or her birthyear.
sample input from user: 1993
and the output should be : 2562
update:
here's my code so far, i created an algorithm if the specific year is a leap year.
if($yr%4 == 0) {
…

phenomenon09
- 65
- 1
- 3
- 9
-5
votes
1 answer
how to get difference date using javascript more specific
hello guys i would like to get difference date using javascript, in php Im using this script to get difference date :
$tgl1 = date('Y-m-d');
$tgl2 = '2019-12-31';
$pecah1 = explode("-", $tgl1);
$date1 = $pecah1[2];
$month1 = $pecah1[1];
…

Gusti Erlangga
- 69
- 1
- 12
-5
votes
1 answer
how to calculate time difference in excel working hours only
How can I calculate hours worked on a project using specific working hours that aren't the same each day?
So Monday - Friday I work 7 am-7 pm, Saturday 9 am -1 pm and I take Sunday off (lucky me). If i start a project on the 1st March 10 am and…

grahamie
- 301
- 2
- 6
- 15
-5
votes
3 answers
Measure difference between dates
Since it seems like people are more concerned about voting down than reading the actual question, the values I should be getting are in the bottom box, and my question is right under it
I need to find the age of a child based on a user entered birth…

Cody Harness
- 1,116
- 3
- 18
- 37
-7
votes
1 answer
Accepting variable Date and final int and calculating the day differenmce
I have an assignment about methods, and 2 variables of Date type:
_borrowedDate(which is related to a Date method as well)
_returnDate (which is also a Date type)
I also have an int MAX_DAYS = 30
I need to set up a borrowdate, then accept a…

Rondolf Gondolf
- 1
- 1