Ninox Date and Time Issues (continued)
I have a date on a form set for January 17, 2023. I have a view looking up Transactions from a table with the filter of
let xDate := datetime(Date);
let xNewDate := extractDate(xDate, -6);
let xTime := Time;
select Transactions where JOBS.Id = 3979 and extractDate('Date / Time', 6) = xNewDate and time('Date / Time') < xTime
I still have 01/16/2023 4:10 pm showing up. This is the previous day.
Any suggestions would be appreciated.
11 replies
-
In addition I am trying to filter all records before 12:00 pm and All records after 12:00 pm and I get all the records for that day.
-
The Time field is statically set to 12:00 pm
-
So you are trying to filter records equal to Jan 17, 2023 but before 12:00pm?
what is the code behind your extractDate() function?
When I troubleshoot a select filter I use another formula field and breakdown each filter.
So does:
select Transactions where JOBS.Id = 3979
return the expected records?
Does:
select Transactions where JOBS.Id = 3979 and extractDate('Date / Time', 6) = xNewDate
return the expected records?
-
I just enter the Date that I want for the report.
-
So you are trying to filter records equal to Jan 17, 2023 but before 12:00pm?
what is the code behind your extractDate() function?
When I troubleshoot a select filter I use another formula field and breakdown each filter.
So does:
select Transactions where JOBS.Id = 3979
return the expected records? Yes
Does:
select Transactions where JOBS.Id = 3979 and extractDate('Date / Time', 6) = xNewDate
return the expected records? Yes all of the + January 16
-
Is Time a time field? or a number field?
-
Nick Massie said:
let xDate := datetime(Date); let xNewDate := extractDate(xDate, -6); let xTime := Time; select Transactions where JOBS.Id = 3979 and extractDate('Date / Time', 6) = xNewDate and time('Date / Time') < xTimeWhy do you use extractDate once with -6 and another time with +6?
-
Fred said:
what is the code behind your extractDate() function?ExtractDate returns any date in a specific time zone. It allows to correct the date operations of the server according to the universal time zone. When datetime calculations are done locally they use the local time zone, when they are done on the ninox server, they use the universal time zone. When you mix the two, you get shifted results
Content aside
- 1 yr agoLast active
- 11Replies
- 143Views
-
3
Following