Creating a virtual timescale - is that even possible with Influx?

Hey @Anaisdg

thanks for answering!
Yea i tried this and it works, however it feels a bit like a workaround. So you cannot create a completely new timescale, but you can start f.e. from 0 and filter by year 1970 to get the results…

When I do this I can read the data in the browser with the suggested custom time period you mentioned, but when I wanna read the data via c# query my memory gets fuller and fuller with no results visible…?

here’s the code

            var ownflux = "from(bucket:\""+bucket+ "\") |> range(start: 0) |> filter(fn: (r) => r._measurement == \"" + measurement+"\")";


            var fluxTables = await client.GetQueryApi().QueryAsync(ownflux, org);
            fluxTables.ForEach(fluxTable =>
            {
                var fluxRecords = fluxTable.Records;
                fluxRecords.ForEach(fluxRecord =>
                {
                    Console.WriteLine($"{fluxRecord.GetTime()}: {fluxRecord.GetValue()}");
                });
            });

(full code is visible in my other thread)

for people who might have the same issue I share the little code snippet :

long UnixTimeNanoseconds(int added_minute, int substracted_years)
            {
                DateTime epochStart = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
                return (DateTime.UtcNow.AddYears(substracted_years).AddMinutes(added_minute) - epochStart).Ticks * 100;
            }