Is it possible to use DateTime library in RobotFrame version 2.8.4, I have checked and come to know that DateTime library comes with RF version 2.8.5 only. So, in my case, i am using the older version which do not have the DateTime library support. My python version is 2.7.8
Asked
Active
Viewed 1,148 times
0
-
my question won't help you much, but I am curious why can't you upgrade Robot Framework to 2.8.5? That would be a very small leap with no backward incompatibility. – Laurent Bristiel May 12 '15 at 06:20
-
I can upgrade RF to 2.8.5, but my whole test-setup is running with RF 2.8.4 and Python 2.7.8, but somehow i have seen some test script which are using DateTime library, and its failing in RF 2.8.4 – rk_12 May 12 '15 at 06:57
-
Actually i use a bundle (.exe) which includes all required stuffs for testing env, like python 2.7.8, RF, git. If required to upgrade the RF only, need to modify the bundle file as per requirement, looks somewhat tedious right at this moment. :)....so just wanted to know whether this issue is only due to version. – rk_12 May 12 '15 at 09:32
-
Why don't you simply try it and see if it will work? – Bryan Oakley May 12 '15 at 10:40
-
@Bryan Oakley: Is there any keyword which can be use for calculating the script execution time? i.e. without using DateTime library. – rk_12 May 14 '15 at 11:19
-
1You can use evaluate, which lets you call any python function, and python has plenty of date handling code. – Bryan Oakley May 14 '15 at 12:37
1 Answers
0
Depending on what you want to use the DateTime library for, there are a few alternatives:
- You can instead use the BuiltIn function Get Time, which can return time in whatever format, current time, timezone adjusted or a specific time converted to another format. Eg.
Get Time epoch
which would be seconds since epoch to current time. - You could use the BultIn function Evaluate which would let you use any python expression.
- You can also run entire python script files, eg. by using the OperatingSystem function Run to execute an entire python script.

Stiffo
- 818
- 6
- 19