Date Field Question.
Is there a fast way to enter a date? The best I have found so far is jan12001. I would like it if I could enter it like 1/1/01.
Also, can the date format be changed to show as 1.1.01 instead of this?
14 replies
-
@Mr. K... The date data type uses the system configured date format. So.. from an "input" perspective.. US dates are looking for Month Day Year. .. From an OUTPUT perspective.. You can always format the date anyway you want.
Hope this helps.
-
Please explain the way to format the output.
-
Mr. K,
Please have a look here https://ninoxdb.de/en/manual/calculations/reference-of-functions-and-language in the section date functions for more explanation.
-
Play with this function, change tokens in double quotes with those from tokens table (see link from previous message):
format(now(), "dddd, Do of MMMM YYYY, h:mm a")
-
Where do I enter the formula?
-
It appears it goes in the Show As box. If so, please give me a formula to enter there that makes my Date Paint Applied field format as 1.1.07. I'm new to this, so seeing it work helps me understand how to do it. Thanks.
-
No Show as is for the calendar. To write something in the calendar.
-
Date field in a record input form shows dates in format based on your OS locale preferences. You can't change it with current Ninox prefs.
"Show As" field from your screenshot does form what you will see in Ninox calendar on that date. It's not even about date at all.
What you can do then? You can format the way your tables/reports will show up given dates. So open column formula editor:
And replace
'Date Paint Applied'
withformat('Date Paint Applied', "M.D.YYYY")
. -
So is there a way to do what I asked in the first place. Format the output in the Date Applied field to read as 1.1.07?
-
I had not refreshed my page to see Ivan Savochenko reply. Thanks for that answer Ivan. Now I get it. I'm testing that now.
-
'Date Paint Applied', "M.D.YYYY" returns an error:
-
Got it now. I needed to add all of the formula "format('Date Paint Applied', "M.D.YYYY")."
Now, is there a way to center that text in the column?
-
Nope.
Numbers align right, dates align center, text strings align left. Function
format()
turns numeric data into text strings. -
This may no longer matter, but if you want the date to align center, as a date format, without it becoming a string, you have to change the settings on your computer to display the date as 01/01/2021. On my mac, I had to go into language and region preferences > advanced > dates and change the "medium date" format to 01/01/2021 for the date change to be reflected in Ninox. I think this is important because the string format would not sort in correct (chronological) ascending/descending order, it has to be a date to do this correctly. This took me forever to figure it out, so hopefully this helps someone with date formatting!
Content aside
- 3 yrs agoLast active
- 14Replies
- 3438Views