Forum Discussion
Temporal Table - Change the ValidFrom Time
From what I understand from your question, what you really want is to query the table and only get rows where ValidFrom an ValidTo is in the timeframe FROM '2025-11-02 06:00:00' TO '2999-01-01 23:59:59.999'.
I do believe changing your select to instead use CONTAINED IN ('2025-11-02 06:00:00', '2999-01-01 23:59:59.999') would give you the result you're looking for.
Query data in a system-versioned temporal table - SQL Server | Microsoft Learn
The first two subclauses [FROM ... TO/BETWEEN ... AND] return row versions that overlap with a specified period (that is, those that started before given period and ended after it), while CONTAINED IN returns only those that existed within specified period boundaries.
As the ValidTo and ValidFrom colums are determined by the system time at transaction start, I don't believe there's any way to guarantee that the query runs at the exact time you want. There's just too many other factors involved.