Fixed datetime issue

Datetime was not properly formatted when making api requests