Solved

problem with TIMESTAMPDIFF the dates are stored in a column of database mysql and field time other column

Posted on 2013-12-13
3
623 Views
Last Modified: 2013-12-16
Hello syntax is
SELECT TIMESTAMPDIFF (MINUTE, '2003-02-01 ', '2003-02-05 12:05:55');
link
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_timestampdiff

but the problem is that the dates are stored in a column based on data type called start_date and enddate date and time this start_time and end_time separate call to the database, as I do to get the difference in minutes since
SELECT TIMESTAMPDIFF (MINUTE, start_date44 star_time44, end_date49 end_time49 from tbltok
0
Comment
Question by:controlit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 39719021
Are you saying that your dates and times are in seperate columns? If so you just combine them like so:
Select datecolumn, timecolumn, datecolumn+timecolumn from tablename
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 39719896
Hi!

This is how you can do this

SELECT TIMESTAMPDIFF (MINUTE, Timestamp(start_date44, star_time44 ) ,Timestamp( end_date49, end_time49)) from tbltok

Regards,
    Tomas Helgi
0
 

Author Closing Comment

by:controlit
ID: 39722441
tanks so much works perfectly
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mysql date time 14 52
Using cfstoredproc to return query data 2 69
MySQL to get Limited value from each category. 6 40
Add a date range function to PDF Generation 9 41
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question