Hi @vshah2 ,
How do you want to compare the timestamp between your SQL Table and your collection?
Do you want to find the latest timestamp between your SQL Table and your collection?
I agree with @Drrickryp 's thought almost, there is no direct way to compare the timestamp string value between the SQL Table and collection. You need to convert the timestamp string value into a actual date time value, and then you could compare the converted date time value.
In order to find the latest timestamp value in SQL Table, please try the following formula (set Text property of a Label to following):
First(
SoftByColumns(
AddColumns('[dbo].[SQLTable]', "Timestamp_DatetTime", DateTimeValue(timestamp)),
"Timestamp_DatetTime",
SortOrder.Descending
)
).timestamp
In order to find the latest timestamp value in your collection, please try the following formula:
First(
SoftByColumns(
AddColumns(CollectionTable, "Timestamp_DatetTime", DateTimeValue(timestamp)),
"Timestamp_DatetTime",
SortOrder.Descending
)
).timestamp
If you want to compare the latest timestamp value in your SQL Table and your collection table, please try the following formula (set the Text property of a Label to following):
If(
First(
SoftByColumns(
AddColumns('[dbo].[SQLTable]', "Timestamp_DatetTime", DateTimeValue(timestamp)),
"Timestamp_DatetTime",
SortOrder.Descending
)
).Timestamp_DatetTime >
First(
SoftByColumns(
AddColumns(CollectionTable, "Timestamp_DatetTime", DateTimeValue(timestamp)),
"Timestamp_DatetTime",
SortOrder.Descending
)
).Timestamp_DatetTime,
"The Lastest Timestamp value is in SQL Table",
"The Lastest Timestamp value is in Colelction"
)
Best regards,