# How to get Dates.Period without label?

**URL:** <https://discourse.julialang.org/t/how-to-get-dates-period-without-label/6718>\
**Category:** General Usage\
**Created:** [October 27, 2017, 12:20pm UTC](https://discourse.julialang.org/t/how-to-get-dates-period-without-label/6718 "2017-10-27T12:20:15Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Daneel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daneel/32/175_2.png) [@Daneel](https://discourse.julialang.org/u/Daneel)\
**Post date:** [October 27, 2017, 1:42pm UTC](https://discourse.julialang.org/t/how-to-get-dates-period-without-label/6718/8 "2017-10-27T13:42:00Z")

</div>

Huh, I didn’t know it could do this until I tried.

```julia
julia> x = Dates.canonicalize(Dates.CompoundPeriod(t2-t1))
17 minutes, 18 seconds, 522 milliseconds

julia> x.periods
3-element Array{Base.Dates.Period,1}:
 17 minutes      
 18 seconds      
 522 milliseconds

julia> x.periods[2]
18 seconds

julia> x.periods[2].value
18

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-get-dates-period-without-label/6718)._
