Date/Time calculation - 31/08/07 11:25 AM
Why is the use of dates/times so difficult in mIRC?
I'm trying to find all records that have been added in the last 24 hours, but the comparison between current date/time and the one from 24 hours ago doesnt work.
if (%start-date %start-time > %date %time) {
Does anyone know how I can get something like this to work?
Thanks in advance!
I'm trying to find all records that have been added in the last 24 hours, but the comparison between current date/time and the one from 24 hours ago doesnt work.
Code:
alias recent-record-stats { var %cnt = 1 var %tbl = records var %ttl = $hget(%tbl,0).item var %start-date = $+($calc($asctime(dd) - 1),/,$asctime(mm/yyyy)) var %start-time = $+($calc($asctime(hh) - 2),:,$asctime(nn:ss)) while (%cnt <= %ttl) { var %data = $hget(%tbl,%cnt) var %date = $gettok(%data,11,9) var %time = $gettok(%data,12,9) if (%start-date %start-time > %date %time) { do stuff } inc %cnt } }
if (%start-date %start-time > %date %time) {
Does anyone know how I can get something like this to work?
Thanks in advance!