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

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

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 Cognitive Search
Azure Cognitive Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
194 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2021-11-11T03:12:57.707+00:00
    SnehaAgrawal-MSFT 11,101 Reputation points Microsoft Employee

    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.

    No comments