Skip to content

Commit a575ee9

Browse files
committed
Updates
1 parent 89e6fb5 commit a575ee9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

models/vote_event.sql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ SELECT
2222
motion_text::TEXT AS motion_text,
2323
motion_classification::TEXT[] AS motion_classification,
2424
CASE
25-
WHEN start_date = '' THEN NULL
26-
WHEN LENGTH(CAST(start_date AS VARCHAR)) = 10 THEN STRPTIME(start_date, '%Y-%m-%d')
27-
ELSE STRPTIME(start_date, '%Y-%m-%dT%H:%M:%S%z') -- CA, CO, FL, OR, PA, IA, WI, USA, NY, NV, NJ, NE, NC, ND, MO, IN,
25+
WHEN start_date = '' THEN NULL
26+
WHEN LENGTH(start_date::VARCHAR) = 10 THEN
27+
STRPTIME(start_date::VARCHAR, '%Y-%m-%d')
28+
ELSE
29+
STRPTIME(start_date::VARCHAR, '%Y-%m-%dT%H:%M:%S%z') -- CA, CO, FL, OR, PA, IA, WI, USA, NY, NV, NJ, NE, NC, ND, MO, IN
2830
END AS start_date,
2931
result::TEXT AS result,
3032
organization::TEXT AS organization,

0 commit comments

Comments
 (0)