Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Can you get Current Date in a Formula for Attribute?

    Posted Fri July 15, 2022 01:19 PM
    I'm trying to clean up some legacy processes in our Maximo environment and migrate them to use functionality that wasn't available in v6.x or v7.1.x. The first area I'm looking at is Escalations we've been using to update fields at close to real time.

    We have an Escalation that uses an Action to set how many days a Work Order has been left open. I would like to covert this Escalation to a Formula for an Attribute.

    The Action is simply:

    :&DATETIME& - reportdate

    Looking at a Formula for the same field, I've tried all of the following:

    $sysdate$ - reportdate
    getdate() - reportdate
    &datetime& - reportdate

    Either I'll get an error saying the formula is incorrect (like with getdate() ) or the field will show 0 as a value when it should be something greater than 0.

    Can you currently do a Formula with the current date in DB Config for Formula for Attribute?

    ------------------------------
    Jason Verly
    Reliability Engineering Manager
    Agropur US
    Le Sueur MN
    ------------------------------

    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Can you get Current Date in a Formula for Attribute?

    Posted Fri July 22, 2022 02:56 AM
    Hi Jason, I tried this through user interface using (now() - reportdate) / (60 * 60 * 24)  in formula :



    Was this what you were looking for? Didn' tried it through escalation though...
    Best Regards

    ------------------------------
    Jani Naglic
    Kopa d.d.
    Slovenj Gradec
    ------------------------------



  • 3.  RE: Can you get Current Date in a Formula for Attribute?

    Posted Mon July 25, 2022 09:22 AM
    Thanks for the help! 

    The final logic that worked for me for SQL Server was: (now() - reportdate) / (60 * 60 * 24 * 1000)


    ------------------------------
    Jason Verly
    Reliability Engineering Manager
    Agropur US
    Le Sueur MN
    ------------------------------



  • 4.  RE: Can you get Current Date in a Formula for Attribute?

    Posted Tue July 26, 2022 01:56 AM
    I'm glad it helped.

    Best Regards.

    ------------------------------
    Jani Naglic
    Kopa d.d.
    Slovenj Gradec
    ------------------------------