datatype converter for datastore