Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xpt write support for DateTime #32

Closed
andreasnoack opened this issue Nov 29, 2023 · 2 comments
Closed

xpt write support for DateTime #32

andreasnoack opened this issue Nov 29, 2023 · 2 comments

Comments

@andreasnoack
Copy link
Contributor

It would be great if writing dates worked

julia> writestat("dates.xpt", DataFrame(date=now()))
ERROR: element type DateTime is not supported
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] rstype(type::Type)
   @ ReadStatTables ~/.julia/packages/ReadStatTables/f5Kes/src/writestat.jl:16
 [3] ReadStatTable(table::DataFrame, ext::String; refpoolaslabel::Bool, vallabels::Dict{Symbol, Dict}, hasmissing::Vector{Bool}, meta::ReadStatMeta, colmeta::StructArrays.StructVector{ReadStatColMeta, NamedTuple{(:label, :format, :type, :vallabel, :storage_width, :display_width, :measure, :alignment), Tuple{Vector{String}, Vector{String}, Vector{ReadStatTables.readstat_type_t}, Vector{Symbol}, Vector{UInt64}, Vector{Int32}, Vector{ReadStatTables.readstat_measure_t}, Vector{ReadStatTables.readstat_alignment_t}}}, Int64}, styles::Dict{Symbol, Symbol}, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ ReadStatTables ~/.julia/packages/ReadStatTables/f5Kes/src/writestat.jl:0
 [4] ReadStatTable(table::DataFrame, ext::String)
   @ ReadStatTables ~/.julia/packages/ReadStatTables/f5Kes/src/writestat.jl:84
 [5] writestat(filepath::String, table::DataFrame; ext::String, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ ReadStatTables ~/.julia/packages/ReadStatTables/f5Kes/src/writestat.jl:250
 [6] writestat(filepath::String, table::DataFrame)
   @ ReadStatTables ~/.julia/packages/ReadStatTables/f5Kes/src/writestat.jl:246
 [7] top-level scope
   @ REPL[9]:1
@junyuan-chen
Copy link
Owner

@andreasnoack Thanks for reporting.

This is a known limitation at this moment that hasn't been addressed due to temporary lack of manpower.

@junyuan-chen
Copy link
Owner

This should have been addressed by #36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants