I'm exploring symbology with ArcMAp 10.2. I created a feature class and it consists of a field called EndDate of type Date. Next, I would like to create a layer and configure symbology, so that the symbol color changes to red once the date is overdue.
I opened the Layer Properties dialog and the tab Symbology. In the 'Show section, you find Quantities and 'Graduated colors'. But my field (EndDate of data type Date) is not shown in the field called 'Value'.
Any ideas about how I can solve this is very much appriciated.
Are there more possibilities with symbology in ArcMap 10.3?
//Johan
Solved! Go to Solution.
Hi Johan,
Thank you for the information.
You can create a new field with datatype Long in attribute table. In its field calculator, paste the following
Int (Left( [EndDate], 4 ) & Mid( [EndDate], 6, 2 ) &Right( [EndDate], 2 ) )
Then use the above field to symbolize the data.
Note: The EndDate Format is in YYYY-MM-DD format.
The field name of your EndDate field is "EndDate".
Hope it will solve the issue.
Thanks,
Jay
Hi Johan,
What is the format of your EndDate field values (e.g. MM/DD/YYYY)?
I would like to have the ISO format: YYYY-MM-DD
//Johan
Hi Johan,
Thank you for the information.
You can create a new field with datatype Long in attribute table. In its field calculator, paste the following
Int (Left( [EndDate], 4 ) & Mid( [EndDate], 6, 2 ) &Right( [EndDate], 2 ) )
Then use the above field to symbolize the data.
Note: The EndDate Format is in YYYY-MM-DD format.
The field name of your EndDate field is "EndDate".
Hope it will solve the issue.
Thanks,
Jay
Many thanks for your help Jay!
I have two fields now EndDate and CalculatedEndDate. The field CalcaulatedEndDate is added with your code, as shown above. When entering and saving a value like 2015-02-10 in EndDate it shows <null> in CalculatedEndDate. Is that the correct result?
Also, do you have any tips on where I add a calculation to show a symbol in red color on overdue, by using my new field CalculatedEndDate?
Hi Johan,
It should show the values without the "-" sign.
Make sure your system Regional Date setting is in same format. And CalculatedEndDate is in Long datatype.
Considering the due date is same for all records, any value more than the CalculatedEndDate is overdue.
Change the symbology accordingly.
Thanks,
Jay
Thanks Jay!
I can now see the new calculated value for date.
//Johan
Jay,
How would you do it if the original date field is MM/DD/YYYY format?
Nevermind I did some tweaking and came up with
Int (Right( [Date], 4 ) & Left( [Date], 2 ) &Mid( [Date], 4, 2 ) )
So mine went from 01/01/2012 to 20120101
You are right Josh...
Dear Jay,
What if my date format is DD/MM/YY ?