diff --git a/apiserver/plane/ee/views/app/issue_property/value.py b/apiserver/plane/ee/views/app/issue_property/value.py index 37c8d1f966..a14d74f9f3 100644 --- a/apiserver/plane/ee/views/app/issue_property/value.py +++ b/apiserver/plane/ee/views/app/issue_property/value.py @@ -5,6 +5,7 @@ from django.core.exceptions import ValidationError from django.db.models import ( Q, CharField, + Func, ) from django.db.models.functions import Cast from django.contrib.postgres.aggregates import ArrayAgg @@ -52,8 +53,11 @@ class IssuePropertyValueEndpoint(BaseAPIView): ), When( property__property_type=PropertyTypeEnum.DATETIME, - then=Cast( - F("value_datetime"), output_field=CharField() + then=Func( + F("value_datetime"), + function="TO_CHAR", + template="%(function)s(%(expressions)s, 'YYYY-MM-DD')", + output_field=CharField(), ), ), When(