I've seen these posts ...

... and in theory I ought to be knowing what to do, yet... I am not. Instead... I'm lost!

I don't want to change the general Format of the way the date is beeing displayed (that for the 1st example), but I do want to get a Future date (in 5 days), but not in the Format I get from the 2nd example.

So if today is June 29th of 2020 (ISO 2020-06-29) and I want the date 5 days in the future I should get july 4th (I see I can do this with datetime2), but be able to format the ouput ad hoc and not change it for the whole document.

Now I would like to be able to have (in abstract) something like this:


... respectivly to do like this:


to get 05.07.2020


to get 5.7.2020


to plainly get 20200704

Any hints will be greatly appreciated!


1 Answer 1


from --


and --

Date format: YYYY-MM-DD

enter image description here



8 days later: \printfdate{ISO}\par

Addendum -- with reference to the OP example requirement of 29 Jun 2020

enter image description here



5 days later: 

|ISO date|:\printfdate{ISO}\par

\def\setdateformat{d\ B\ Y}
|d\ B\ Y|: \printdate\par
|d.m.Y|: \printdate\par
\def\setdateformat{a,\ d\ b\ Y}
|a,\ d\ b\ Y|: \printdate\par

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .