from datetime import datetime dt = datetime.strptime('26 Sep 2012', '%d %b %Y') newdatetime = dt.replace(hour=11, minute=59, second=25)