Difficult part is usually
RowKey
is certainlyline
which is having worth likeWednesday Nov 14 12:26:42 2016
Timestamp can be used to query rows in Azure Table Storage. However, you will need to use TableQuery.GenerateFilterConditionForDate instead of TableQuery.GenerateFilterCondition.For any DateTime column, TableQuery.GenerateFilterConditionForDate must be used. From your code sample, change GenerateFilterCondition to GenerateFilterConditionForDate for Timestamp filter.
I attempted query usingTimestampIike5,8843838 platinum badges141
141 gold badges270270 bronze badges
2 Answers
Néo,
lf you need to have got the most recent admittance in your partition, making use of a string date time for the line key is certainly not really a great approach as Table Storage stores entities in climbing order based on the Line Essential.
lf at the present point you can modify the worth of your row key, make use ofDateTime.UtcNow.Clicks:With thát approach, when querying your desk, you will become capable to get 1 entry corresponding to the latest.
lf you cán't change the value of your row key, you will have to get all the posts in the partition, signifying loading all of it in storage, and then order them making use of the Timestamp to retrieve the final one. If you have got a lot of items this is definitely not really a great approach.
Vivién ChevallierVivién Chevallier
1,21711 platinum badge66 silver badges1313 bronze badges
Orange Table Program doesn'capital t support
Order By
features, therefore with the present setup just option for you can be to download all organizations and sort them invert chrnologically on the customer part. This certainly is not an optimal option when the number of organizations in the table become large.Other choice (which would require you to renovate the program) would be to convert the date/time worth in change ticks:
This will make certain that the most recent entries are added to the top of the table instead of at the base of the desk. To get the most recent admittance, you would just have to take 1st entity from the table.
Gáurav MantriGáurav Mantri76.3k88 money badges118
118 magic badges142142 bronze badges