6. May 2015

OpenRefine date conversions

One of common tasks for OpenRefine is conversion of dates from String.
Conversion could be performed by toDate function.

Source data:

11-04-15 9:28
12-04-15 8:56

Open Edit cell – Transform for the column and type following GREL:

value.toDate("dd-MM-yy h:mm")

Result (in Date format):


Another example. Source data

11/04/2015 09:28:25
13/04/2015 08:56:57


toDate(value, "dd/MM/yyyy hh:mm:ss")