Help with import data into OpenAir

Hello, I am trying to import air quality data (particularly looking at wind speed) into OpenAir and am having difficulties. The Date column of my data is formatted as yyyy-mm-dd T H:M:S.
This is my code:
test <- import("99999953878.csv", date= "DATE",
date.format="%Y/%m/%d%H:%M:%S"
and I am getting the error:
Error in import("99999953878.csv", date = "DATE", date.format = "%Y/%m/%d%H:%M:%S") :
Date conversion problems, check that date.format is correct.
First few dates looks like this: 2021-01-01T00:00:00, 2021-01-01T00:05:00, 2021-01-01T00:10:00, 2021-01-01T00:15:00, 2021-01-01T00:20:00, 2021-01-01T00:25:00

I think the problem is the 'T' that is included in the column, but I can't find any information on how to get R to read this correctly. I would appreciate any help

Hi,

Looking at the format you provided and the actual date example, it seems that you use / instead of -, which would cause an issue. The 'T' is not really an issue, as you can keep it in the format. Here is an example

as.POSIXct("2021-01-01T08:00:01", format = "%Y-%m-%dT%H:%M:%S")
#> [1] "2021-01-01 08:00:01 EST"

Created on 2022-04-15 by the reprex package (v2.0.1)

Hope this helps,
PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.