Add datetime nearest detection