Getting today's date value

Ask general questions here.
miljan
Posts: 3
Joined: Mon Jul 22, 2019 1:53 pm

Getting today's date value

Post by miljan » Mon Jul 22, 2019 2:12 pm

Hi ranorex team,

Image

I want to "get" today's date and time value and put "key sequence" in this calendar.

Thank you in advance

User avatar
Support Team
Site Admin
Site Admin
Posts: 11963
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Getting today's date value

Post by Support Team » Mon Jul 22, 2019 7:41 pm

Hello Miljan,

The following code will use the key sequence action to write the current date and time in the specified format.

Code: Select all

Report.Log(ReportLevel.Info, "Keyboard", "Current date and time.", new RecordItemIndex(1));
Keyboard.Press(System.DateTime.Now.ToString("dd/MM//yyyy HH:mm"));
Delay.Milliseconds(20);
I hope this helps!

Regards,
Sean
.
Image

miljan
Posts: 3
Joined: Mon Jul 22, 2019 1:53 pm

Re: Getting today's date value

Post by miljan » Mon Jul 29, 2019 12:03 pm

It helps a lot, thank you very much!

Regards