About 63 results
Open links in new tab
  1. How to get the number of days of difference between two dates on …

    Apr 15, 2010 · I need to get the number of days contained within a couple of dates on MySQL. For example: Check in date is 12-04-2010 Check out date 15-04-2010 The day difference would be 3.

  2. Calculate difference between two datetimes in MySQL

    Jun 6, 2012 · I am storing the last login time in MySQL in, datetime -type filed. When users logs in, I want to get the difference between the last login time and the current time (which I get using NOW()). …

  3. sql - Mysql Datediff query - Stack Overflow

    Mysql Datediff query Ask Question Asked 14 years, 6 months ago Modified 8 years, 1 month ago

  4. sql - Difference between two dates in MySQL - Stack Overflow

    Jan 21, 2011 · How to calculate the difference between two dates, in the format YYYY-MM-DD hh: mm: ss and to get the result in seconds or milliseconds?

  5. How to get difference between two dates in months using MySQL …

    Month-difference between any given two dates: I'm surprised this hasn't been mentioned yet: Have a look at the TIMESTAMPDIFF () function in MySQL. What this allows you to do is pass in two …

  6. Count days between two dates, excluding weekends (MySQL only)

    Mar 1, 2012 · I need to calculate the difference (in days) between two dates in MySQL excluding weekends (Saturday and Sunday). That is, the difference in days minus the number of Saturday and …

  7. Trying to find differences of hours between two dates in MySQL

    Jun 6, 2018 · SELECT DATEDIFF(a.departure_time, a.arrival_time) as HourDiff; FROM airlines a WHERE HourDiff >= 8 I'm also trying to find differences of time that exceeds over 8 hours but …

  8. mysql - day difference between today's date and a specified date in …

    May 25, 2016 · DATEDIFF(NOW(), P.SubscrpEndDate__c) AS 'SubscriptionDueDate' According to the manual: DATEDIFF(expr1, expr2) returns expr1 − expr2 expressed as a value in days from one date …

  9. Date Difference in MySQL to calculate age - Stack Overflow

    May 17, 2016 · select dateDiff(current_timeStamp,dob) from sometable 'here dob is the table column I mean I want the difference from the current date time to the table field dob, each query result is the …

  10. How to calculate interval between datetime in MySQL?

    Sep 18, 2009 · DATEDIFF() returns expr1 – expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are …