How to set a date to NULL in Field Calculator

8759
14
Jump to solution
07-31-2018 03:04 PM
FionaRenton1
Occasional Contributor II

I'm using ArcPro 2.2.1

How do I set a date to Null instead of 1/1/1900 in the field calculator of a table in a file geodatabase?

My work around was to do this in 10.4.1 and calculate a set of records to NULL but I'd like to break the habit!

1 Solution

Accepted Solutions
MarkBockenhauer
Esri Regular Contributor

With Python as the expression type, you can calculate to  None 

View solution in original post

14 Replies
JoeBorgione
MVP Emeritus

That's not such a bad habit; what's wrong with that approach?

That should just about do it....
FionaRenton1
Occasional Contributor II

You're right...I suppose I have about 4 years to figure this out

0 Kudos
MarkBockenhauer
Esri Regular Contributor

With Python as the expression type, you can calculate to  None 

FionaRenton1
Occasional Contributor II

I had tried  none

but not None

Thanks

DanPatterson_Retired
MVP Emeritus

I would be remiss it I didn't ask... did it work in PRO 2.2? or was this just since the update today 

FionaRenton1
Occasional Contributor II

I tried it before and after the update today. 

JoeBorgione
MVP Emeritus

Well Fiona....  You are the official trail blazer for the upgrade!  

That should just about do it....
MatthewLeonard
New Contributor III

I'm trying to accomplish the same thing - set the value for a date field to Null. However, I'm using ArcGIS Desktop 10.3, with a file geodatabase feature class stored on my org's network server.  I had already tried the answer given here (calculate the field using Python and enter None), but I got the following error: "An unexpected failure occurred. No rows were updated." 

When I try to edit the field for an individual feature, there is a drop-down for selecting a date from a calendar.  When I try to just delete the field value for one feature, I also get an error.  Anyone know how to get around this?

0 Kudos
JoeBorgione
MVP Emeritus

I'm guessing that the field properties do not allow null values.  With alter field you should be able to fix it if that's the problem:  Alter Field—Help | ArcGIS for Desktop 

That should just about do it....