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):

2015-04-11T09:28:00Z
2015-04-12T08:56:00Z

Another example. Source data

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

GREL:

toDate(value, "dd/MM/yyyy hh:mm:ss")
  • Where’s the fish?

  • Translations

  • Further info

  • Twitter

    Follow @jurajmichalek on twitter.

  • Comments

  • Tags

  • Topics