Isoformating value when it is of type datetime