chrisamccoy / google-refine

Automatically exported from code.google.com/p/google-refine
Other
0 stars 1 forks source link

Transform -> To Date doesn't support ISO 8601 date parsing #487

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Thad on the mailing list:

"It appears that either I am doing something wrong, or toDate() Java function 
cannot correctly detect a sortableDateTime:"yyyy-MM-ddTHH:mm:ss" format (as is 
listed in the \main\webapp\modules\core\externals\date.js  (is that javascript 
even called ?  did not appear to be with Edit cells -> Common Transforms - To 
date)

I created a project by importing JSON from a Web Address(s) url from this Apple 
iTunes search:

http://itunes.apple.com/search?term=u2&entity=album&attribute=artistTerm&limit=2
00

The release date column is already in a known format, but Refine does not seem 
to recognize it as a known date format ?

I could not get Sort by date operation to work on the column created in Refine, 
because it appears Edit cells -> Common Transforms -> To date cannot seem to 
change it from text to date.

Using this column Transform: value.toDate("yyyy-mm-dd").toString("yyyy-mm-dd")
does work.  However, trying when you then try to do the Sort by earliest date 
on that transformed column, it does not sort by earliest date.  Hmm... maybe 
the problem is within the Sort operation itself ?

Original issue reported on code.google.com by tfmorris on 18 Nov 2011 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by tfmorris on 18 Nov 2011 at 9:13

GoogleCodeExporter commented 9 years ago
Fixed in r2383.  There's a separate problem with the single cell edit not 
supporting ISO 8601 (because Javascript's Date.parse()) doesn't, but I'll open 
a new bug report for that.

Original comment by tfmorris on 18 Nov 2011 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by tfmorris on 18 Sep 2012 at 3:03