Azure search datetimeoffset field add day and filter le datetime.utcnow

Ehsan Ghorabian 1 Reputation point
2021-11-07T14:05:39.673+00:00

I have two fields ( phaseStarted : DatetimeOffset and duration : Int32 ) in azure index and want to add duration to phaseStarted and check it is less than DateTime.UtcNow, is it possible ?

I know I can have another column and fill it once upload document, but want to know about this way, thanks

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
728 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 18,366 Reputation points
    2021-11-11T03:12:57.707+00:00

    Apologize for late response! connected with PG on this ask and there’s not a way to do this without adding a new field like the you mentioned.

    Suggest you to refer to this document which gives examples of filtering on DateTimeOffsets: OData filter reference

    Hope this helps.

    0 comments No comments