https://github.com/tduskin/robotframework-datetimelibrary
I hope it helps... Please feel free to leave any feedback as an issue on Github.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
The built-in keyword won't give you time in the format you want. You can get the month, day and year, but the year will have the century (eg: 2014, rather than 14) Of course, you could write a keyword that calls the built-in keyword and then does some math, but there's an easier way. Use robot's ability to call inline python code. You can then call the strftime function which will give you complete control of the format.For example:*** Test Cases ***| Example of getting the time in a specific format| | ${time}= | Evaluate | time.strftime("%b %d %y", time.localtime()) | time| | log | time: ${time} | warnThe documentation for what %b, %d and %y mean can be found here:
On Sun, May 25, 2014 at 10:17 PM, Phuoc Ha <phuo...@gmail.com> wrote:
Hello guys,
I want to get system date and convert date to format "May 22 14" in Robot FW.
I know some way to format date with keyword "Get time" from BuiltIn:
http://robotframework.googlecode.com/hg/doc/libraries/BuiltIn.html?r=2.6.1
but I haven't found out the way to format date: "May 22 14".
I have attached my picture below.
Please help me to solve this issue.
Thanks for your help.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.