Jul 29, 2008 #1 darinmc Technical User Feb 27, 2005 171 GB Hi I have the simple code below to calculate the time difference. How would I change or format the final result 1:30 TO a number 1.50 Code: Private Sub cmdTdif_Click() Me.Tdif = HoursAndMinutes(Me.Tout - Me.Tin) End Sub Thx Darin
Hi I have the simple code below to calculate the time difference. How would I change or format the final result 1:30 TO a number 1.50 Code: Private Sub cmdTdif_Click() Me.Tdif = HoursAndMinutes(Me.Tout - Me.Tin) End Sub Thx Darin
Jul 29, 2008 #2 Remou Technical User Sep 30, 2002 13,030 BE Why not use DateDiff: Diff_Minutes=DateDiff(Me.Tin,Me.Tout) Upvote 0 Downvote
Jul 29, 2008 Thread starter #3 darinmc Technical User Feb 27, 2005 171 GB I'm getting: DateDiff - Agument not optional Darin Upvote 0 Downvote
Jul 29, 2008 #4 Remou Technical User Sep 30, 2002 13,030 BE Oops. Diff_Minutes=DateDiff("n", Me.Tin,Me.Tout) Upvote 0 Downvote
Jul 29, 2008 Thread starter #5 darinmc Technical User Feb 27, 2005 171 GB Thats great, now how would I convert 90 to 1.5? Before I was getting 1:30 But i need it to read 1.5 Thx Darin Upvote 0 Downvote
Thats great, now how would I convert 90 to 1.5? Before I was getting 1:30 But i need it to read 1.5 Thx Darin
Jul 29, 2008 Thread starter #7 darinmc Technical User Feb 27, 2005 171 GB Thx, Didn't think it would be that easy as I thought the 90 was still in a different format... Thx Darin Upvote 0 Downvote
Thx, Didn't think it would be that easy as I thought the 90 was still in a different format... Thx Darin