Date Inc Days variable

Discuss RoboTask here
Post Reply
tcarvalho
Posts: 25
Joined: Mon Feb 24, 2020 5:46 pm

Date Inc Days variable

Post by tcarvalho »

When using this variable is there a way to populate a placeholder 0 for the first 9 months of the year? Currently I have the variable set to enter the date from 30 days ago, which would be 4/27/2020 for example, however I need it to populate "04/27/2020" for the selection it's making.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Date Inc Days variable

Post by Oleg »

Probably I don't understand your question...
Describe your problem in more detail please
Oleg Yershov
tcarvalho
Posts: 25
Joined: Mon Feb 24, 2020 5:46 pm

Re: Date Inc Days variable

Post by tcarvalho »

I am having robotask populate a date for searching items. I need Robotask to set the date exactly 30 days ago. This "DateIncDays" variable is achieving the result however it is generating the date as "4/27/2020", however the search field that I am having robotask populate is expecting the date in "mm-dd-yyyy" format. When the variable is used it is generating "m-dd-yyyy" because the month is one digit.

I hope this better explains the scenario.
I tried using "DateTimetoFormat{Date}" however this only generates today's date. I tried incorporating this with the "DateIncDays" variable and was not able to achieve the results I need.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Date Inc Days variable

Post by Oleg »

This is not a problem
Use the expression {DateTimeToFormat({DateIncDays(-30)},mm-dd-yyyy)}
Oleg Yershov
tcarvalho
Posts: 25
Joined: Mon Feb 24, 2020 5:46 pm

Re: Date Inc Days variable

Post by tcarvalho »

Thank you this worked! I had incorrect formatting/structure when attempting the same expression you listed.
Post Reply