Date subtract from a particular date

Hi All,

Can anybody suggest me, how we can subtract the date from a date we getting from mail header(Mail received Date)?

Date of received mail: 02/16/2019
and the required date is 3 days before this date?

Convert the string to dateTime object
yourDate = DateTime.ParseExact(yourdateString,"MM/DD/YYYY")
finalDate = yourDate.AddDays(-3)

Karthik Byggari

Hi @ShekharRPA

Use an assign activity and pass the type as datetime

and Dt received-Now.AddDays(-3).ToString(“MM/dd/yyyy”)

Ashwin S

Like this

Where item is the variable inside the FOR EACH a loop having the list of mailmessage variable as input

Cheers @ShekharRPA

Can share an sampleXaml

Can share an sample Xaml

Can share an sample Xaml


      Assign str =  "02/16/2019"
      Assign str = CDate(Str).AddDays(-3).ToString("MM/dd/yyyy")

Now str will have 02/13/2019


Sure like this (9.5 KB)

Cheers @ShekharRPA