The python version used Maximo automation scripts is 2.5.2. So the normal DateTime function in Python cannot be used in Maximo. The DateTime function is used in Python 3.x and above. As an alternative, we can use the gmtime and strftime packages.
from time import gmtimefrom time import strftimenowTime = strftime("%Y-%m-%dT%H:%M:%S", gmtime())print(nowTime)mbo.setValue("TARGSTARTDATE", nowTime)print("TARGSTARTDATE-->" + mbo.getString("TARGSTARTDATE"))
Thank you very much it is very useful topic
ReplyDelete