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"
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 also: Text(Now(), "DD/MM/YYYY, hh:mm A");
Hi,
I'm experiencing similar values but I am trying to populate a text field with a text formatted date (MM/DD/YYYY).
I have similar arcade expressions in Field Maps, that work fine, but in QuickCapture arcade editor all looks well, but when I see the written values in ArcGIS Pro they are in epoch format. I'm using app version 1.20.22 and do not have spaces in the formatted expression.
The AGOL hosted feature layer is published with UTC time and then I have been adding new fields for Alaska CreationDate and AKDate (text format of date).
Thanks in advance, Kathy
We found a bug for this issue. It will be resolved in the December (1.21) release.
Great, thanks for looking into this and I look forward to the update in December. Thank-you!
Kathy