diff options
-rw-r--r-- | Source/SPCustomQuery.m | 2 | ||||
-rw-r--r-- | Source/SPTableContent.m | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index ba3eca62..08b5838c 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1883,7 +1883,7 @@ if ( [[anObject description] isEqualToString:@"CURRENT_TIMESTAMP"] ) { newObject = @"CURRENT_TIMESTAMP"; } else if ([anObject isEqualToString:[prefs stringForKey:SPNullValue]] - || (([columnTypeGroup isEqualToString:@"float"] || [columnTypeGroup isEqualToString:@"integer"]) + || (([columnTypeGroup isEqualToString:@"float"] || [columnTypeGroup isEqualToString:@"integer"] || [columnTypeGroup isEqualToString:@"date"]) && [[anObject description] isEqualToString:@""])) { newObject = @"NULL"; diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 2ca31b70..85241ce2 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -2882,9 +2882,9 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper NSString *fieldTypeGroup = [fieldDefinition objectForKey:@"typegrouping"]; // Use NULL when the user has entered the nullValue string defined in the preferences, - // or when a numeric field is empty. + // or when a numeric or date field is empty. if ([rowObject isNSNull] - || (([fieldTypeGroup isEqualToString:@"float"] || [fieldTypeGroup isEqualToString:@"integer"]) + || (([fieldTypeGroup isEqualToString:@"float"] || [fieldTypeGroup isEqualToString:@"integer"] || [fieldTypeGroup isEqualToString:@"date"]) && [[rowObject description] isEqualToString:@""] && [[fieldDefinition objectForKey:@"null"] boolValue])) { fieldValue = @"NULL"; |