How to put yesterday's date into text box

Could you tell me how to put yesterday’s date into text box in certain web page?
when today is 2/16/2020 then it is 2020-02-15


see 5. Date Arithmetic

1 Like


use this
import java.time.LocalDate
LocalDate date =;
println ("DEBUG current date minus day "+date)
DEBUG current date minus day 2020-02-15

1 Like

Hi, Timo

I am just new to Katalon. So could you tell me where I use this formula in katalon studio UI ?

anywhere you will need to use it, KS or keyword

1 Like

you have to use the script-view for this approach

1 Like

Hi Timo!

Using the script you’ve provided, how do I change the format of the date from 2020-02-15 to 02/15/2020?

Thanks a lot!

Read “7 Date and Time formatting” in