Date keyword from Katalon Store

Hi everybody
I am learning to use Katalon. katalon store has a plugin for handle date time, I installed it but I dont know how to use it.
Any help ?
Thank you a lof

You should rather learn and use Java 8 Date/Time API.

This is the starndard. Learning Java 8 Date/Time API will strengthen your career.

2 Likes

Thank you very much, but as I said. I am a beginner using Katalon and either I know how to handle APi. I was reading the apis date time links and I think that it would be nice to know for me, but i dont know how to use it.
Gracias

Please create a blank Test Case in a Katalon Studio project. The name can be any. Open the test case with Test Case editor using the “Script mode”.

Copy and paste the following lines in the test case. Then run it.

import java.time.LocalDate

/**
 * https://www.baeldung.com/java-8-date-time-intro
 */

LocalDate localDate = LocalDate.now()
println "today is " + localDate.toString()

In the console tab of Katalon Studio, you will see today’s date is printed:

This snippet would be enough for you to get started with reading the Baeldung’s article.

Hello thank you very much and it worked fine, but when I try to do the same in a .groovy file that I have created, then it does not recognize the class methods.

I want to work with dates but in a .groovy file where I am doing the validations and then I call those methods in the testcase.

I don’t understand this. Please show your code, and errors you got.