# Formating Dates.CompoundPeriod

**URL:** <https://discourse.julialang.org/t/formating-dates-compoundperiod/59167>\
**Category:** Data\
**Tags:** dates, time\
**Created:** [April 13, 2021, 8:23am UTC](https://discourse.julialang.org/t/formating-dates-compoundperiod/59167 "2021-04-13T08:23:03Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![shubh\_b](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shubh_b/32/20697_2.png) [@shubh\_b](https://discourse.julialang.org/u/shubh_b)\
**Post date:** [May 11, 2021, 7:00am UTC](https://discourse.julialang.org/t/formating-dates-compoundperiod/59167/3 "2021-05-11T07:00:13Z")

</div>

So far, in Julia converting a `CompoundPeriod` type object to any other `Period` type or `TimeType` is not straightforward. @Laco_Kovac, you can notice another topic [here](https://discourse.julialang.org/t/how-can-i-convert-a-compoundperiod-type-object-to-period-type-in-julia/60930).

@quinnj, I think you are trying to say something like this:

```julia
julia> using Dates

julia> x = Dates.CompoundPeriod(Dates.Hour(12), Dates.Minute(13))
12 hours, 13 minutes

julia> Dates.format(Dates.Time(x.periods[1], x.periods[2]), dateformat"HH:MM:SS")
"12:13:00"

```

---

_[View the full topic](https://discourse.julialang.org/t/formating-dates-compoundperiod/59167)._
