We help IT Professionals succeed at work.

Time difference between two time columns

baxtalo
baxtalo asked
on
I need to get the time difference between two time columns. My first column stores the start times and my second colum stores the end times. I'd like to display in the browser the differencte between these two times in minutes.
My first column is called Meeting_Start and my second column is called Meeting_End
Can anyone please help me write the SQL.
Thank you.
Comment
Watch Question

If its SQL Server then use
Select datediff(n,MeetingStart,Meeting_End) as minutes from yourtable

Author

Commented:
It's not SQL Server unfortunately.
I was searching for the solution and I found something that actuall returns some values, but I don't know what those numbers are. They don't return the minutes I need:

((MeetingStart - (MeetingEnd))*360)/60 as timediff

When I call timediff some numbers appear, but they don't match the minutes I need
Commented:
DateDiff also works for Access databases in this way:
DateDiff ( interval, date1, date2, [firstdayofweek], [firstweekofyear])
So in your case would be like rpoole69 has suggested, can you give it a try?

Author

Commented:
I actually retrieve the info from a data warehouse. I can retreive the MeetingStart and MeetingEnd fields with no problem.
When MeetingStart is 14:30 and MeetingEnd is 14:40 I would like to see number 10 in my Minutes column.
When I use rpoole69's script, I get this error message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[NCR][ODBC Teradata Driver][Teradata Database] Syntax error: Data Type "n" does not match a Defined Type name.

If I remove n, the error will be MeetingStart does not match....