500.07 - Working With Dates & Date Functions

preview_player
Показать описание


Ninox provides us with many powerful features that we can use to manage and enhance content stored in Date fields. From scheduling recurring events to calculating durations and projections, this Ninox Learning Channel class will teach you how to take full advantage of the date and functions in the Ninox Database Solution.
Рекомендации по теме
Комментарии
Автор

Hi, how can you get the total records of sales, appointments, etc for the present day.

So that each day it gives you only the total number of sales, total amounts, etc for that day.

mohamedkeita
Автор

How to move "+ Create record" to top in Ninox 3.0

biznow
Автор

Very good video, great effort and thank you. Can I ask that if you don't deconstruct the date how can you add 2 years from the original date field. Mine is date('PTS Passed' +2) which works ok for days and is easy to change to the correct amount of days for 2 years. But this wont always take into account the leap years. is there a way of saying 2 years rather than the amount of days which takes into account the leap years? Thanks in advance

ashuk
Автор

I cannot find the mentioned template Calender Tools. Is it still available and where?

rogerreber
Автор

It's less readable but this can be shortened to

function ageYM(date : date) do
let months := (year(today()) - year(date) - 1) * 12 + 12 - month(date) + month(today()) - number(day(today()) < day(date));
floor(months / 12) + " Years " + months % 12 + " Months"
end

johnhalls
Автор

I helped someone implement the ageYM function only to find it is incorrect. I have written my own which might help

function ageYM(date : date) do
let xDate := date;
let fullYears := year(today()) - year(xDate) - 1;
let monthsBefore := 12 - month(xDate);
let monthsAfter := month(today()) - number(day(today()) < day(xDate));
let allMonths := monthsBefore + fullYears * 12 + monthsAfter;
let years := floor(allMonths / 12);
let months := allMonths % 12;
years + " Years " + months + " Months"
end

johnhalls
Автор

Hello and thank you for your great and useful videos ! I'm looking for how i can get the date of when a value is becoming negative. I'd tried this code : "if 'Value' <= 0 then today() end" but the function today() returns the date of the present day (and it changes every day lol). But i only want to get the date the first time the value becomes negative. I can't find a solution. Thanks in advance

lionelbelin
Автор

I was looking for information on how to type the date into a field using "1/22/55" as it seems the field can't convert that to Jan 22 1955.

a-fox
Автор

I was hoping you were going to tell us how to work out duration between two dates in years months and days. I assume it’s not possible to show anything other than number of days? This seems strange when there is a big gap between the two dates.

darrenbarson
Автор

Hello how can I lock date after registered?

protomill
Автор

the ageYM function is still not working properly. If you put yesterday's date as the 'Beg Date', it is returning 1 Year, 0 Months and should be returning 0 Years, 0 Months

darrenbarson