From 9f85aaffb997a8baa41322021e4a76324a50b9a2 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 6 Mar 2013 00:29:45 +0000 Subject: - If date-type fields are cleared, and allow NULLs, save the cell value as NULL; this implements Issue #1638 --- Source/SPCustomQuery.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/SPCustomQuery.m') 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"; -- cgit v1.2.3