# Convert string months (January, February, March, etc.) to date format

**URL:** <https://discourse.julialang.org/t/convert-string-months-january-february-march-etc-to-date-format/84444>\
**Category:** New to Julia\
**Tags:** dates\
**Created:** [July 19, 2022, 7:46am UTC](https://discourse.julialang.org/t/convert-string-months-january-february-march-etc-to-date-format/84444 "2022-07-19T07:46:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nash](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nash/32/14482_2.png) [@Nash](https://discourse.julialang.org/u/Nash)\
**Post date:** [July 19, 2022, 7:46am UTC](https://discourse.julialang.org/t/convert-string-months-january-february-march-etc-to-date-format/84444/1 "2022-07-19T07:46:21Z")

</div>

I have a database where one of the columns contains the strings for months spelled out in english and the first letter capitalized (January, February, March, etc.). How do I convert the column to a date format?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [July 19, 2022, 8:18am UTC](https://discourse.julialang.org/t/convert-string-months-january-february-march-etc-to-date-format/84444/2 "2022-07-19T08:18:21Z")

</div>

You can use the `U` date format specifier (see docs for [`DateFormat`](https://docs.julialang.org/en/v1/stdlib/Dates/#Dates.DateFormat)):

```julia
julia> using Dates

julia> Date("January", dateformat"U")
0001-01-01

julia> Date("March", dateformat"U")
0001-03-01

```
