PtokaX forum

Development Section => Your Developing Problems => Topic started by: WooshMan on 10 February, 2004, 16:51:41

Title: Comparing two times
Post by: WooshMan on 10 February, 2004, 16:51:41
Hi,

I have a time HH:MM:SS in a table against a user and would like to know how many minutes difference is between the time in the table and the current time.

I have both times in variables but cannot work out how to compare them and get the number of minutes difference.

-- current time --
s,e,thours,tmin,tsecs = strfind(date("%X"),"(%d+):(%d+):(%d+)")

-- time in table --
   s,e,hours,min,secs = strfind(tban[user.sName],"(%d+):(%d+):(%d+)")

Please help

Thanks :-)

Woosh
Title:
Post by: NotRabidWombat on 11 February, 2004, 06:29:43
You'll want to read up on Julian dates and then use one of the code examples from here:
http://board.univ-angers.fr/thread.php?threadid=617&boardid=6
Title:
Post by: WooshMan on 11 February, 2004, 10:51:03
Thanks NotRabidWombat

Will do :-)