Fixed Datetime conversion bug