[QUERY] How to query by Timestamp in Azure.Data.Tables?
See original GitHub issueLibrary name and version
Azure.Data.Tables 12.6.1.0
Query/Question
I’m sure I’m just missing something here, but I’m having an issue trying to query entities from my tables when filtering only by Timestamp. I’ve tried the following filter conditions to retrieve data:
Expression Filter
var results = table.Query<TableEntity>(x => x.Timestamp >= DateTime.Parse("2021-09-10T14:26:22.251Z"))
OData Filter
var results = table.Query<TableEntity>(filter: "Timestamp ge datetime'2021-09-10T14:26:22.251Z'");
As previously mentioned, both queries do not return any results. I’ve verified there’s data in my table that satisfies this condition by running a query that filters by a PartitionKey and inspecting the return data. I’m on a fairly tight deadline for this work, so any help would be greatly appreciated!
Environment
OS: Windows - net4.8 IDE: Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.3.4
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
@oh-yeah - I agree this is not a great experience - I did find that it is actually documented here . That said, I’ll relay the feedback.
Thanks for the additional info. I truly regret taking the time to upgrade to the “supported” Cosmos Table packages now. I guess I’ll either have to alter an unknown number of records across tens of thousands partitions for the suggested workaround 👎 or use the deprecated packages 👍, easy choice.