allow to pass a datetime as parameter