Custom Record Field Extracting Partial Date Issue

Certified Senior Developer

I am using custom record field to extract completedOnDate (custom field) from completedOn(date and time) field. But there are sceanrio where ,when I am changing time zone ,date returned is still in gmt but not according to user timezone because of this when I am quering like below,few extra work items are displayed
a!queryFilter(
field: 'recordType!{ee5aa46d-0228-430f-a794-1134a11fbcc0}CMGT_Task.fields.{d7e1c9a9-03ae-4bfd-bbe6-2edc7e8d915f}completedOnDate',
operator: "=",
value: today()
),
 How to fix this issue ,so that date is based on user timezone only and not in gmt

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Appian stores all DateTime values in UTC. Custom record fields are evaluated in UTC during sync, not per user. As a result, extracting dates from DateTime fields at the record layer can cause timezone mismatches. The recommended approach is to perform DateTime range filtering using user-timezone functions like today() at query time rather than relying on derived date fields.

    Heavy check mark Remove completedOnDate from filtering
     Heavy check mark Filter using completedOn BETWEEN startOfDay AND endOfDay
     Heavy check mark Convert DateTime → local timezone only in UI
     Heavy check mark Avoid timezone logic in record sync

Reply
  • 0
    Certified Lead Developer

    Appian stores all DateTime values in UTC. Custom record fields are evaluated in UTC during sync, not per user. As a result, extracting dates from DateTime fields at the record layer can cause timezone mismatches. The recommended approach is to perform DateTime range filtering using user-timezone functions like today() at query time rather than relying on derived date fields.

    Heavy check mark Remove completedOnDate from filtering
     Heavy check mark Filter using completedOn BETWEEN startOfDay AND endOfDay
     Heavy check mark Convert DateTime → local timezone only in UI
     Heavy check mark Avoid timezone logic in record sync

Children
No Data