Re: [julia-users] How to convert Int64 to Date
The easiest way right now is to do Date(Dates.UTD(735685)) It's a bit awkward, and I think we should have a better default option. Perhaps we should define `convert(::Type{Date}, x::Int64)` defined for this. On Sat, Jan 23, 2016 at 9:36 AM, Min-Woong Sohnwrote: > I want to convert an Int64 value 735685 to Date type (2016-1-22). > convert(Date,735685) does not work. Does anyone know how to do this? > >
Re: [julia-users] How to convert Int64 to Date
Jacob, I agree -- in both directions: convert(::Type(Date), x::Int64) and convert(::Type(Int64), x::Date). Jeffrey On Saturday, January 23, 2016 at 12:20:53 PM UTC-5, Jacob Quinn wrote: > > The easiest way right now is to do > > Date(Dates.UTD(735685)) > > It's a bit awkward, and I think we should have a better default option. > Perhaps we should define `convert(::Type{Date}, x::Int64)` defined for this. > > On Sat, Jan 23, 2016 at 9:36 AM, Min-Woong Sohn> wrote: > >> I want to convert an Int64 value 735685 to Date type (2016-1-22). >> convert(Date,735685) does not work. Does anyone know how to do this? >> >> >
Re: [julia-users] How to convert Int64 to Date
I've created a pull request to clarify the usage here and add documentation. https://github.com/JuliaLang/julia/pull/14775 -Jacob On Sat, Jan 23, 2016 at 9:36 AM, Min-Woong Sohnwrote: > I want to convert an Int64 value 735685 to Date type (2016-1-22). > convert(Date,735685) does not work. Does anyone know how to do this? > >
[julia-users] How to convert Int64 to Date
I want to convert an Int64 value 735685 to Date type (2016-1-22). convert(Date,735685) does not work. Does anyone know how to do this?