Skip to content

Bug reading datetimes (floating datetime format) #231

Description

@alixepstein

When I look at my data on Socrata this column is datetime type, and I can see the date and time down to the second, but when I use read.socrata it comes in as character type and while the date is there, the times are all 00:00:00.
Example:

sessiondf <- read.socrata(https://data.cambridgema.gov/resource/99xk-ybak.json, email = SocrataUsername, password = SocrataPW)

class(sessiondf$starttime)
[1] "character"
head(sessiondf$starttime)
[1] "2020-01-01T00:00:00.000Z" "2020-01-01T00:00:00.000Z" "2020-01-01T00:00:00.000Z" "2020-01-01T00:00:00.000Z"
[5] "2020-01-01T00:00:00.000Z" "2020-01-01T00:00:00.000Z"
tail(sessiondf$starttime)
[1] "2024-04-16T00:00:00.000Z" "2024-04-16T00:00:00.000Z" "2024-04-16T00:00:00.000Z" "2024-04-15T00:00:00.000Z"
[5] "2024-04-16T00:00:00.000Z" "2024-04-16T00:00:00.000Z"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions