Allow to convert also string and long to datetime.