Ask a Question

DATA PARAMETERS

LuciRUoc
Occasional Contributor

DATA PARAMETERS

Hello,

 

I have a script that creates new appointment. Within the data field I can type in the date manually but wondered if there was a way to setup a parameter that takes the current date and allows me to format it how I want it.

 

Is this built into TestComplete?

3 REPLIES 3
Marsha_R
Community Hero

This should work for you.  You can put it inline with your test, but if you are using this formatted date in several places, then I suggested creating a variable to store the formatted date and using that variable instead.  

https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqdatetime/index.html


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
LuciRUoc
Occasional Contributor

Is there a way to do this in Keyword scripting?

If you are using keyword tests instead of scripting, then it will look something like this

 

Choose Set Variable Value and then use Code Expression to set the date format

https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqconvert/datetimetoformat...

 

Marsha_R_0-1623423875346.png

 

 

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: