# Dates: Strict parsing (DateFormat)

**URL:** <https://discourse.julialang.org/t/dates-strict-parsing-dateformat/130274>\
**Category:** General Usage\
**Tags:** question, package, dates, parsing\
**Created:** [June 27, 2025, 10:07am UTC](https://discourse.julialang.org/t/dates-strict-parsing-dateformat/130274 "2025-06-27T10:07:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parazetamol](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/parazetamol/32/52125_2.png) [@Parazetamol](https://discourse.julialang.org/u/Parazetamol)\
**Post date:** [June 27, 2025, 10:07am UTC](https://discourse.julialang.org/t/dates-strict-parsing-dateformat/130274/1 "2025-06-27T10:07:48Z")

</div>

Hi there,

is it possible to have the parsing of the specified DateFormat _strict_ ?

I don’t want to have a string like “1:2” parsed as Time when explicitly specifying dateformat"HH:MM:SS".

```julia
Time("1:2",dateformat"HH:MM:SS")

```

In my case “1:2” is a ration 😉  
You might ask why I am trying to parse a Time when I now it’s a ratio. Well .. I don’t know it in advance … I try to guess the type of the fields in unknow datasets. I partly use Parsers for that purpose, but it handles the above string the same.

```julia
Parsers.parse(Time,"1:2")

```

Moreover filling in missing fields carries the risk of feigning too high an accuracy.  
I think ISO8601 says that “01:02” (as point in time) means a minute and not a second like “01:02:00” does.

What do you think?

Greetings  
Paracetamol

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [June 27, 2025, 10:55am UTC](https://discourse.julialang.org/t/dates-strict-parsing-dateformat/130274/2 "2025-06-27T10:55:54Z")

</div>

Link to [related thread](https://discourse.julialang.org/t/stricter-date-parsing/12334).
