Problem with format data

42 views
Skip to first unread message

Alessandro Natale

unread,
Mar 5, 2021, 10:56:42 AM3/5/21
to OpenRefine
Hello to all,

i'm a newbie user to OpenRefine and I have a problem with the format data.

I have a big excel file with a data column. (like the image)Schermata 2021-03-05 alle 16.41.33.png

When I imported the file in OpenRefine, the format of the column is like this imageSchermata 2021-03-05 alle 16.42.38.png

There is a method to convert this strange data in dd/mm/yyyy string or yyyy-mm-ddThh:mm:ssZ?

thank you so much...Alessandro

Tom Morris

unread,
Mar 7, 2021, 4:09:48 PM3/7/21
to openr...@googlegroups.com
Hi Alessandro. Welcome to the OpenRefine community! Check out the toString function in the Transform dialog. It accepts a format string which you can use to format the date in whatever way you'd like. https://docs.openrefine.org/manual/grelfunctions/#tostringo-string-format-optional

Tom

Alessandro Natale

unread,
Mar 8, 2021, 4:29:30 AM3/8/21
to OpenRefine
Thanks Tom for the reply!

Unfortunately, the function you suggested does not work. This is the error: "Error: toString accepts an object and an optional second argument containing a date format string".

 I solved it in an "alternative" way: I converted the excel file into a csv file and now the date-fields are seen in the classic O.R format .. I think the problem is to be associated with excel and its management of dates and in particular with the "cell format" which can be customized. By turning the excel file into csv instead, I believe these formatting settings are lost, making it easier for O.R. recognize the format of the fields.

Reply all
Reply to author
Forward
0 new messages