Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing times

Status
Not open for further replies.

52strong

IS-IT--Management
May 2, 2003
1
GB
Dear all,

Please help! I have two string fields in my database which are actually times. I can successfully convert these to valid time fields using the timevalue function. However, I need to be able to work out the differences between these two times and it doesn't seem to be working.

Help!
Ta
 
Dear 52strong,

Concatenate the currentdate onto the field and then use a datediff to get the difference in seconds.

Example:

datediff("s",currentdate + timevalue(6,03,32),currentdate + timevalue(9,52,32))

Hope that helps,

ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top