Skip to content

Cannot convert an object of type DataValues.DataValue{Any} to an object of type DateTime #47

@IanButterworth

Description

@IanButterworth

I'm not sure if this is a core DataValues issue or one with the implementation in ExcelFiles or DataFrames (where I posted the same issue):
queryverse/ExcelFiles.jl#13
JuliaData/DataFrames.jl#1478

(I'll close the inappropriate issues once I figure out where the issue is)

I have dataframe df where column 1 is an array of DataValues.DataValue{Any}.
How can I convert it to DateTime, and allow for missing?

This doesn’t work:

datetimes = convert(Vector{Union{DateTime,Missing}}, df[1])
MethodError: Cannot `convert` an object of type DataValues.DataValue{Any} to an object of type DateTime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions