I have created a quick capture project and field map project using the same hosted feature layer. Within this layer, I have a date field which uses a calculated expression of:
Now()
which gets the current date and time of user input.
I then have a string field which formats this date to how I want.
An example of this would be
dd/mm/yyyy, hh:mm AM/PM
12/04/2024, 10:45 AM
This arcade expression is:
Solved! Go to Solution.
This doesn't address the QuickCapture question, but you can get that formatting much easier using the Text function
Text(Now(), "DD/MM/YYYY, hh:mm A");
The only thing is doesn't address is the ISOYear, but I'm not clear on why you would want that. If you used your formula on a date like 31 December 2024, it would return "31/12/2025"
This doesn't address the QuickCapture question, but you can get that formatting much easier using the Text function
Text(Now(), "DD/MM/YYYY, hh:mm A");
The only thing is doesn't address is the ISOYear, but I'm not clear on why you would want that. If you used your formula on a date like 31 December 2024, it would return "31/12/2025"
Which version of QuickCapture are you using? Arcade wasn't supported in versions before 1.18.
Thanks, I have tested this expression out and it seems to be working when I captured some test points.
I have found that the original expression is failing in QuickCapture because of the comma followed by a space ", " . It looks like this is an ArcGIS Runtime bug. If you remove the comma the above will work.
But the following will work: Text(Now(), "DD/MM/YYYY, hh:mm A");