How to check for "Some Date" older than "Current Date"?
#4

Quote:
Originally Posted by Babul
Посмотреть сообщение
compare each value in a decreasing order: year, month, day, hour, minute, second. when any comparison returns a difference, the date is different. are all date strings formatted the same way? yours looks like
pawn Код:
format(datestring,sizeof(datestring),"%dth %s %d, %d:%d,%d",day,monthname[month],year,hour,minute,second);
so by using
pawn Код:
sscanf(datestring,"d' 's[16]' 'd','d':'d'.'d",day,month,year,hour,minute,second)
and reordering the comparisons (years before months), it should work
Thats also possible, but it's much more work then the way I explain. But yea if you wan't you can use babul's way.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)