# Dates in DataFrames

**URL:** <https://discourse.julialang.org/t/dates-in-dataframes/107887>\
**Category:** General Usage\
**Tags:** question, dataframes\
**Created:** [December 21, 2023, 2:14am UTC](https://discourse.julialang.org/t/dates-in-dataframes/107887 "2023-12-21T02:14:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Annetts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/david_annetts/32/202541_2.png) [@David\_Annetts](https://discourse.julialang.org/u/David_Annetts)\
**Post date:** [December 21, 2023, 2:14am UTC](https://discourse.julialang.org/t/dates-in-dataframes/107887/1 "2023-12-21T02:14:50Z")

</div>

Hi,

I (think I) have a vector of dates in `rdat`. At least, `typeof.(rdat)` returns a lot of `Date`.

So I’m confused as to why `tmp = DataFrame(td = rdat)` returns a DataFrame with the column `td` listed as a vector of type `Any`.

More importantly, how do I get a vector of Dates into a DataFrame as a vector of Dates?

TIA.

D.

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [December 21, 2023, 3:07am UTC](https://discourse.julialang.org/t/dates-in-dataframes/107887/2 "2023-12-21T03:07:53Z")

</div>

If there are only `Date` in the vector, you should be able to fix it by doing `identity.(v)` (note the dot) or `Vector{Date}(v)`.
