# Expressing a week before the time right now

**URL:** https://discourse.julialang.org/t/expressing-a-week-before-the-time-right-now/43633
**Category:** New to Julia
**Created:** [July 24, 2020, 8:04pm UTC](https://discourse.julialang.org/t/expressing-a-week-before-the-time-right-now/43633 "2020-07-24T20:04:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nash](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nash/32/14482_2.png) [@Nash](https://discourse.julialang.org/u/Nash)
#### Post date: [July 24, 2020, 8:04pm UTC](https://discourse.julialang.org/t/expressing-a-week-before-the-time-right-now/43633/1 "2020-07-24T20:04:58Z")

</div>

Suppose I express the time right now as:

```
rightnow = Dates.format(Dates.now(Dates.UTC),"Y-mm-ddTH:MM:SS.SSSZ")

```

Now I need to express, in the same format, the time at some previous point, say, one week from rightnow. How do I do that?

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [July 24, 2020, 8:13pm UTC](https://discourse.julialang.org/t/expressing-a-week-before-the-time-right-now/43633/2 "2020-07-24T20:13:46Z")

</div>

> [@Nash](#):
>
> ```julia
> rightnow = Dates.format(Dates.now(Dates.UTC),"Y-mm-ddTH:MM:SS.SSSZ")
> 
> ```

you are expressing `rightnow` as a `String` and not a date. you need

```julia
julia> rightnow = (Dates.now(Dates.UTC))
2020-07-24T20:13:34.568

julia> rightnow - Dates.Week(1)
2020-07-17T20:13:34.568

```
