# Dates package: "m" delimiter via \\m produces escape sequence error

**URL:** https://discourse.julialang.org/t/dates-package-m-delimiter-via-m-produces-escape-sequence-error/76525
**Category:** New to Julia
**Tags:** dates
**Created:** [February 16, 2022, 1:29am UTC](https://discourse.julialang.org/t/dates-package-m-delimiter-via-m-produces-escape-sequence-error/76525 "2022-02-16T01:29:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![teamtelefunken](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/teamtelefunken/32/16231_2.png) [@teamtelefunken](https://discourse.julialang.org/u/teamtelefunken)
#### Post date: [February 16, 2022, 1:30am UTC](https://discourse.julialang.org/t/dates-package-m-delimiter-via-m-produces-escape-sequence-error/76525/1 "2022-02-16T01:30:00Z")

</div>

I’m trying to import a CSV file that has a date column with a string entry say “2001m1” for January 2001, so that the delimiter is the letter “m”. Using the Dates package (and DataFrames), I’m trying to translate this column to a common date format. Documentation in [Dates · The Julia Language](https://docs.julialang.org/en/v1/stdlib/Dates/) states that  
_The date “1995y01m” would have the format “y\ym\m”._

I import the CSV data as a dataframe df, with the date column called say :datem. However, when I try to use the suggested format, the operation Date.(df.datem, “y\mm”) produces “ **ERROR: syntax: invalid escape sequence** ”. The format “y\m\\m” (using a double backslash \\ as the escape sequence for \) also doesn’t work. Any advice on how to to use the letter “m” as a delimiter in Dates would be greatly appreciated.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [February 16, 2022, 2:01am UTC](https://discourse.julialang.org/t/dates-package-m-delimiter-via-m-produces-escape-sequence-error/76525/2 "2022-02-16T02:01:38Z")

</div>

```julia
julia> Date("2001m1", "y\\mm")
2001-01-01

julia> Date("2001m1", dateformat"y\mm")
2001-01-01

```
