|
POST
|
I would make sure that the formats for all your date fields are consistent, just to avoid any potential issues. Is your Created Date field a string or a datetime object? Can you show us where this expression is? Is it in a script or a tool?
... View more
10-13-2022
07:29 AM
|
0
|
4
|
3175
|
|
POST
|
I'm wondering what your "Date" data type is in your expression. When I look up that error, it's basically saying that "Date" is a string, and that your StartingReportDate & EndReportDates are datetime objects. Your comparison operators are not going to work between different data types, maye try converting your "Date" field to a datatime object.
... View more
10-13-2022
07:01 AM
|
2
|
2
|
3179
|
|
POST
|
Can you repost with it inserted in the Code window so we can see the indents? I don't know if deleting the cursor on your last line will help?
... View more
10-12-2022
06:58 AM
|
0
|
0
|
1206
|
|
POST
|
Yes, I would use your wildcard character and the LIKE operator to build a SQL Query. In ArcMap, that is the percent sign or % Here's an article to get you started. https://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/building-a-query-expression.htm#GUID-EC06FE3F-38BA-4CF2-AEAF-F69D65C7C567 I'm searching for all rows that in my street address field that have the word Church in them. I put the wildcard before AND after church, because I know it has street numbers and road types on either side of the road name I'm looking for. SITUSAddress1 LIKE '%CHURCH%'
... View more
10-12-2022
05:53 AM
|
1
|
1
|
1506
|
|
POST
|
I can think of a Python way and a non-Python way. Let's start with the non-Python one. I would select by attribute all records that have "101 N Maple" in them. Then, change your attribute view to only the selected features, and do a Field Calculator session on only your selected values. In field calculator, you can calculate a field using it's existing values. So if your field name is something like !Street! Then your expression will be something like !Street! + ' Avenue' Notice I added a space before avenue in the string you are adding on, but that is dependent on if you have a space already in there or not. Make sure you chose the Python and doublecheck your edits before you save everything to make sure it worked.
... View more
10-12-2022
05:19 AM
|
1
|
3
|
1529
|
|
POST
|
We are working on different Python versions - I have not updated to 3.0. so you might have different errors then I see. You might try removing the first datetime in the expression, as the first part has it twice and the 2nd one has it once. i.e. like this datetime.strptime('%ReportDate%', '%m/%d/%Y') - datetime.timedelta(days = 365) When I tested in Python, I was able to create a definition formated similar to what @Brian_Wilson posted. import datetime
string = '10/10/2022'
def startTime(string):
date = datetime.datetime.strptime(string, '%m/%d/%Y')
print(date)
finalDate = date - datetime.timedelta(days = 365)
print(finalDate)
return finalDate
startTime(string)
... View more
10-10-2022
09:50 AM
|
2
|
0
|
7749
|
|
POST
|
Edit: I updated my answer to just have a replacement for the arcpy.time.ParseDateTimeString('ReportDate%') with an alternative as a part of the datetime module. This calculation is just creating an expression that accepts any string formatted like "month/day/year" i.e. "10/10/2022" Building this expression means that you will be able to input that date when you run the actual tool, and the date will be consumed in the "Select By Layer Attribute" tool. For a simpler expression, you can also try the following: datetime.datetime.strptime('%ReportDate%', '%m/%d/%Y') - datetime.timedelta(days = 365)
... View more
10-10-2022
08:10 AM
|
1
|
2
|
6195
|
|
POST
|
It looks like the support article suggests a few alternatives. Personally, I prefer the datetime module, which appears to already be used in your expression. I did just notice that the screenshots in your instructions are from Pro even though this is listed under Desktop. They might update the instructions soon. Looks like that expression starts to parse a date string for an attribute in your dataset. There are ways to parse a string to a datetime, such as using the strptime() method, which is a built-in method of the datetime class. Try something like this: datetime.strptime(date_string, format) I use something similar in a database reconciliation script: dateToday = currentTime.strftime("%Y-%m-%d")
... View more
10-10-2022
06:31 AM
|
1
|
0
|
6206
|
|
POST
|
Your model looks like ArcPro, but the instructions are for ArcGIS Desktop. Are you sure that is the correct tool to call in Pro? I did see this article - looks like that tool may be depreciated at Pro 3.0. You might have to do this in ArcMap if you want to finish your project. https://support.esri.com/en/technical-article/000027752
... View more
10-10-2022
06:13 AM
|
1
|
2
|
6226
|
|
POST
|
Is the expression variable correct? You set the expression with the variable named "expression1" but the function is taking a variable named "expression"
... View more
10-07-2022
10:31 AM
|
0
|
1
|
2567
|
|
POST
|
I used Code Academy, but a GIS-specific class offered through PennState World Campus was what really took me to the next level. If you can afford it, I suggest it. https://www.e-education.psu.edu/geog485/node/91 They do put the materials online, but having that student/teacher and student/student interaction is valuable.
... View more
09-19-2022
06:02 AM
|
0
|
0
|
1932
|
|
POST
|
No - from what I read here - a ArcGIS Enterprise federated server means that ArcGIS Pro only supports connections that allow you to use services, not publish or administer them.
... View more
09-19-2022
05:39 AM
|
1
|
0
|
1530
|
|
IDEA
|
@FredericPoliart_EsriAU Nice app! Do you mind sharing how you got the "Techincal FloodWise Property Report" to generate? I'm interested in doing something similar.
... View more
09-19-2022
05:33 AM
|
0
|
0
|
3492
|
|
POST
|
My first thought would be to cycle through all the layers and export to pandas data frames, and then go to excel from there. Have you looked at tutorials like this? https://towardsdatascience.com/how-to-build-a-multi-tabbed-excel-file-using-pandas-731391c2cc53
... View more
09-09-2022
06:35 AM
|
3
|
0
|
1358
|
|
POST
|
So are you trying to overwrite or append? The API reference states that calling truncate operation deletes all features or attachments in a hosted feature service layer, and your function name says "overwrite." The sample below overwrites a service. A phyton script to Overwrite a feature layer base on a Pandas DataFrame See this for appending: https://developers.arcgis.com/python/guide/appending-features/ I would also say the FeatureLayer class has an append function with details at: https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#featurelayer
... View more
09-08-2022
11:09 AM
|
1
|
0
|
3471
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-09-2023 06:45 AM | |
| 2 | 06-28-2021 01:11 PM | |
| 2 | 02-24-2025 08:55 AM | |
| 1 | 07-08-2024 01:49 PM | |
| 1 | 01-24-2023 08:40 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-22-2025
11:15 AM
|