How To Print Previous 31 Dates From Today's Date

Hi @jack.chan And Everyone.

I Want To Print 31 Previous Dates From Today’s Date.

For Example Today’s Date Is 07/09/2022

I Want To Print 31 Previous Days, So My Output Should Be

07/08/2022
08/08/2022
09/08/2022
.
.
.
07/09/2022

Any Help Is Appreciated.

see this example @Ishan_Shelke
Sequence.xaml (8.3 KB)
result

Hey @Ishan_Shelke,

You can achieve this in this way
image

Thanks,
Sanjit

1 Like

hello @Ishan_Shelke

You can do this either with an expression or by using the modify date activity.

use a for each loop and put this activity inside that …Then you can change the data format and the number of days via the variable.

Hello @Ishan_Shelke
Kindly refer the xaml file you may got some idea

DateNeed=31, Where dateNeed is an integer
Loop the process using While activity , 1<=DateNeed and DateNeed=DateNeed-1 placed in loop

DateAndTime.Now. AddDays(-DateNeed).ToString("dd/MM/yyyy")

Forum_31daysPrint.xaml (8.1 KB)
image

image

Have fun automation :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.