I have a SQL Statement that lists CrateDate and PaymentDate for all users:
SELECT CONVERT(Datetime, tblUserProfileData.PaymentDate, 103) AS Datetime, aspnet_Membership.CreateDate
FROM tblUserProfileData INNER JOIN
aspnet_Membership ON tblUserProfileData.UserId = aspnet_Membership.UserId
WHERE (tblUserProfileData.PaymentDate <> '') AND (aspnet_Membership.CreateDate > CONVERT(Datetime, '31.01.2009', 103)) AND
(aspnet_Membership.ApplicationId = '189bdd21-fc7a-123d-8a12-1706b1d6a329')
Now I need to find out how many days there is between CreateDate and PaymentDate for an average user. Example: The SQL returns "10" if the average between CreateDate and PaymentDate is 10 days.
Hope someone please can help me solving this :)