got active site query working by changing Long to Int and manually formatting datetime object