Showing posts with label current date. Show all posts
Showing posts with label current date. Show all posts

Sunday, 22 November 2020

Implicit Variables like Current Date and or Time to a Communications Template | Maximo

:DATETIME - to display the current Date and Time

:DATE - to display the current Date

:TIME - to display the current Time

:HOSTNAME - to display the hostname defined in System Properties 

Sunday, 18 August 2019

Playing with Dates in Jython Automation Script | IBM Maximo


SimpleDateFormat - String
from java.util import Date
from java.text import SimpleDateFormat

vCurrentDate = SimpleDateFormat("MM/dd/yyyy").format(Date())
vReportDate = SimpleDateFormat("MM/dd/yyyy").format(mbo.getDate("reportdate"))
if vReportDate > '08/18/2019' or vReportDate > vCurrentDate  :
    mbo.setValue("DESCRIPTION",str(vReportDate))


Date Utility - Get Current Date Only (00:00 midnight) 

https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/psdi/app/common/DateUtility.html

from java.util import Date
from psdi.app.common import DateUtility

today = DateUtility.getDate(Date())

yesterday = DateUtility.addDays(today, -1)

AddDays = DateUtility.addDays(today, 5)

AddMinutes = DateUtility.addMinutes(today, 2)