How to display time in a proper format? #514
Replies: 3 comments
-
|
Hi you can use the following expression: {datestr(now,'dd-mm-yy hh:MM:ss')} or if you need just the time: {datestr(now,'hh:MM:ss')} Yaniv Kalsky (Yaniv.K) - 10/28/2012 10:22 AM
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks Yaniv, That's a good example. Just to emphasize: when formatting the time - make sure to use Capital M and not a lowercase m. mm - month MM - minutes. undefined (tal.a) - 10/28/2012 10:31 AM
|
Beta Was this translation helpful? Give feedback.
-
|
Please note that the "datestr" function is an old function that was replaced in TestShell 4.8 The recommended functions to use are: currenttime2str, time2str, time2vect, timediff, addtotime These functions gets the date format in the same way .Net does: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx Yaniv Kalsky (Yaniv.K) - 07/16/2013 02:23 AM
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Support,
I need a way to display time in a specific 24h format in my test - like 15:24:12
if the minutes / seconds is less then 10 I need to have a trailing zero - 15:06:05 and not 15:6:5
Any advice?
(Tester) - 10/28/2012 09:59 AM
· 3040 ·
Beta Was this translation helpful? Give feedback.
All reactions