question

Dre0711 avatar image
Dre0711 asked Dre0711 posted

Adding timestamp to a file within itest testcase.

I would like to add a timestamp to a file within an iTest execution.  Is it possible?

iTest
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
sandeepreddynv avatar image
sandeepreddynv answered sandeepreddynv posted

Hi,

 

I believe you can use info command to retrieve the timestamp of current local time.

 

info timestamp ?formatString?

Returns a timestamp of current local time.

If you do not specify the optional format string, then the command uses Java's localized full timestamp format.

An example formatString is “yyyy-MM-dd HH:mm:ss.SSS” (We use quotes to enclose the string because the space character appears in the string.) Format strings are based on Java's SimpleDateFormat.

 

Hope it helps!!

 

Regards,

Venkata

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.