question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] How to query by Timestamp in Azure.Data.Tables?

See original GitHub issue

Library 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:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
christothescommented, Sep 15, 2022

@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.

1reaction
oh-yeahcommented, Sep 15, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to filter by timestamp using TableClient from @azure ...
I have an azure storage table which Im trying to filter by timestamp. I am using TableClient by @azure/data-tables to achieve this.
Read more >
query table for latest timestamp
query table for latest timestamp. let t =my_table | summarize max(timestamp); my_table | where timestamp == t;. why doesn't this work?
Read more >
TableEntity.Timestamp Property (Azure.Data.Tables)
The Timestamp property is a DateTimeOffset value that is maintained on the server side to record the time an entity was last modified....
Read more >
[BUG] Cannot filter on Timestamp using Azure.Data.Tables ...
When I apply a filter on the Timestamp field, the query returns zero results. Expected behavior. The query should return the results that ......
Read more >
Joining within time window - Azure Data Explorer
Timestamp : A column of type datetime indicates when the event described by the record happened. Run the query. Kusto
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found