Entering dates into a date field using only digits (and a slash or hífen)
To enter a date into a date field, as far as I know, it is necessary to use the numeric keypad and the alphabetic keyboard.
In the case of a date in DD/MMM/YYYY format, we have to key in the days on the numeric keypd, jump to the alphabetic keyboard to enter the month and return to the numeric keypad to enter the year.
It's not very helpful if we have to enter a series of dates in sequence.
Is there any way to enter the date using just the numeric keypad?
For example 17/03/2021 or 17/03/21 or 17032021 or 170321?
Of course, we can use an auxiliary field to enter the date in one of these formats and then using some code (a function, ...) insert it into the date field.
I was trying to avoid that job.
Or if a function for this purpose is available I would be grateful.
4 replies
-
Jose
you can - ie in a date field when the date picker is showing
if i ignore the picker and simply type 0712 and hit the enter key the rest of the date is filled in as 07/12/21.
Does that no do what you want?
-
Hello,
I tried your suggestion typing 0712 and return.
What I get is 7 Jan 2012 and not 07/12/21.
If I type only the day, I get the current month and year automatically.
For instance typing 15 I get 15 Dec 2021.
I'm running Ninox 3.5.8 on a Mac.
I need a more general solution because I'm building a database from scratch and I need to key in dates from 1990 till the present date.
-
After all, it wasn't as complicated as I initially thought.
The following code on the Trigger After Update of "DataTXT" field solves the situation with a few lines.
Supposing we have a text field "DataTXT" and a date type field "Data".
It doesn't do all the checks to see if the entry is correct but it allows for much faster entry of dates.I've written a few more lines to allow a DDMMYY six-digit entry only, but a few more checks are needed to see if the year is later or earlier than 2000, so I haven't put them here.
"";
"/* Date input as text DDMMYYYY */";
if length(DataTXT) = 8 then
let xDay := number(substr(DataTXT, 0, 2));
let xMonth := number(substr(DataTXT, 2, 2));
let xYear := number(substr(DataTXT, 4, 4));
if xDay > 31 or xMonth > 12 then
alert("Error - Days>31 or Month>12 !!!")
end ;
Data := date(xYear, xMonth, xDay)
else
alert("Date should have 8 digits")
end -
Still no real solution to enter a date in a date field with some of these methods? In Spain, we enter data in this format: dd/mm/yy or dd/mm/yyyy. For example, may the 17th, 2022 would be:
17/05/2022 or
17/5/2022 or
17/5/22
Is there any settings I need to change to allow the easier way of entering a date in Ninox?
NOTE: it does work well on Safari Mac OS; the wrong behavior only shows in Ninox app.
Content aside
-
1
Likes
- 2 yrs agoLast active
- 4Replies
- 625Views
-
2
Following