Converts the given object to a datetime object, if possible. If an actual datetime object is passed, it is returned unmodified. If the value is a string, it is parsed as a datetime.
Date strings are accepted in three different forms: date only (Y-m-d), date with time (Y-m-d H:M:S) or with date+time with microseconds (Y-m-d H:M:S.micro).
Return type: | datetime |
---|
Rounds the given datetime object upwards.