April 28, 2011 at 8:28 am
need help to write a query to pull the below data
difference between
RIinvitationCreatedDate in RInvitation table
and UsertRegistrationCompletedDate from User table
and Join these two tables with RInvitation.RInvitationLoginID on User.UserID
Thank you
April 28, 2011 at 8:36 am
What have you tried so far?
John
April 28, 2011 at 8:50 am
select u.UserID, u.UsertRegistrationCompletedDate - r.RIinvitationCreatedDate
from RInvitation r
join User u
on u.UserID = r.RInvitationLoginID
BUT THE OUTPUT IS
101900-01-01 05:00:17.300
111900-01-01 00:00:58.597
121900-01-01 00:07:58.157
131900-01-01 00:04:01.503
201899-12-31 23:41:00.080
211899-12-31 23:41:39.953
231899-12-31 23:15:03.610
291899-12-31 21:27:39.953
I need the difference time between RIinvitationCreatedDate in RInvitation table
and UsertRegistrationCompletedDate from User table. Thanks!
April 28, 2011 at 8:53 am
When you say "difference time", what do you mean - the number of minutes, the number of hours, or something else? I recommend that you look at the DATEDIFF function.
John
April 28, 2011 at 9:15 am
Thank you.
I am looking for difference in minutes
May 3, 2011 at 1:30 am
OK. Like I said, look at DATEDIFF.
John
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply