# Tidying up a csv file (follow-up to question 53261/4)

**URL:** https://discourse.julialang.org/t/tidying-up-a-csv-file-follow-up-to-question-53261-4/53292
**Category:** New to Julia
**Tags:** dates, csv
**Created:** [January 13, 2021, 4:59pm UTC](https://discourse.julialang.org/t/tidying-up-a-csv-file-follow-up-to-question-53261-4/53292 "2021-01-13T16:59:01Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Fliks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fliks/32/2494_2.png) [@Fliks](https://discourse.julialang.org/u/Fliks)
#### Post date: [January 13, 2021, 5:28pm UTC](https://discourse.julialang.org/t/tidying-up-a-csv-file-follow-up-to-question-53261-4/53292/2 "2021-01-13T17:28:07Z")

</div>

Regarding (3): You can use the Dates.DateLocale function to define a new Locale for the DateTime parsing.  
For german this would look like that:

```julia
months = ["Januar"
          "Februar"
          "März"
          "April"
          "Mai"
          "Juni"
          "Juli"
          "August"
          "September"
          "Oktober"
          "November"
          "Dezember"]

months_abbrev = ["Jan"
               "Feb"
               "Mar"
               "Apr"
               "Mai"
               "Jun"
               "Jul"
               "Aug"
               "Sep"
               "Okt"
               "Nov"
               "Dez"]

days = ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"]
days_abbrev = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"]

Dates.LOCALES["german"] = Dates.DateLocale(months, months_abbrev, days, days_abbrev)

```

Then you can use dateformat to parse your dates.  
For your use case this should be

```julia
dform = Dates.DateFormat("dd U yyyy")
date = Dates.Date(somedatestring, dform)

```

See [Dates · The Julia Language](https://docs.julialang.org/en/v1/stdlib/Dates/#Dates.DateFormat) for the details for the dateformat construction.

---

_[View the full topic](https://discourse.julialang.org/t/tidying-up-a-csv-file-follow-up-to-question-53261-4/53292)._
