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")
Rating: 2.0/5. From 1 vote.
Please wait...

Leave a comment

6. May 2015 at 15:22 - Software engineering (Tags: , , , ). Both comments and pings are currently closed.

Comments are closed.