is there a command to turn a date in such format (2001-12-7) into the seconds from epoch which is returned from time()
DId you read about PHP's time and date functions?