azureazure-blob-storageazure-table-storageazure-tablequery

Filtering the Data storage table using PartitionKey and Date time


I want to get the data over a time period using both PartitionKey and datetime filter.

https://sa.table.core.windows.net/ABC()?$filter=Timestamp%20gt%20datetime'2023-04-03T13:47:52.083669Z'andPartitionKey%20eq%20'123455432'

I have tried this query to get the partitionkeys which are generated after the datetime given but when i am trying , I am getting a 400 (Bad request) error


Solution

  • I believe the reason you are getting this error is because you did not include spaces at proper places.

    Please try the following:

    https://sa.table.core.windows.net/ABC()?$filter=Timestamp%20gt%20datetime'2023-04-03T13:47:52.083669Z'%20and%20PartitionKey%20eq%20'123455432'

    Notice how I added a space before and after and.