Expressing a week before the time right now

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?

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

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

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