PF dates

 4 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
ryand
New Member Send Private Message
Posts: 0
New Member

Does anyone know how to run a process flow for the current date minus 1 day?

David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
There is an AddDay function (you can use when defining your date variable within the Start node or in an Assign node). If you set the value to -1 it will back off 1 day.
David Williams
ryand
New Member Send Private Message
Posts: 0
New Member

Do you have to use the date type variable and not a string type variable?  I got it to work and sent to me as "Wed Feb 17 2010 13:51:22 GMT-0600 (CST)" date type in an email sent to me but it would be nicer if I could keep it as mm/dd/yyyy without having to further manipulate it.  Is that possible?

David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
Use AddDay(today(),-1) to get yesterdays date and assign it to the variable qdate and then assign another variable (String) with getDateDME(qdate) or getDateAGS(qdate) depending upon the format you need it in.
David Williams
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
You could try to be clever and do this all with one string variable getDateDME(AddDay(today(),-1)) - that should work.
David Williams