Skip to main content
April 26, 2022
Question

Stored Procedure(SP)

  • April 26, 2022
  • 7 replies
  • 0 views

Hello all,

I have the rule ,in which once one date valuation enters ,next date value is coming in terms of years with the rule based on some condition from the database. Now I need to get those dates columns in terms of months using stored procedure has created for that.  How can I achieve with the sp? 

ri!date+(ri!numberOfYears * 365)- rule for the no of years

    7 replies

    April 27, 2022

    can anyone answer for this?

    richardm900458
    April 27, 2022

    your goal is a bit hard to understand. you try to call stored procedures from DB?


    April 27, 2022

    how can I convert months to years? 

    andrewh0007
    April 27, 2022

    Why does it need to be a stored procedure that does this? I'm finding it hard to decipher what you are trying to achieve but is it that you have two dateTimes that are exactly X years apart and you need to convert this difference into the number of months?

    davel001150
    April 29, 2022

    Are we all just overthinking this?  Is it just multiply the number of years by 12?

    Or are you trying to find exactly the number of months between 2 dates, as in 18 months or 27 months?  

    floor(tointeger(today() - todate("09/11/2001")) /365 * 12) ?

    andrewh0007
    May 1, 2022

    We're not over thinking it. We have no idea what the OP wants and depending on what he wants it could either be really easy or quite complex.

    The OP also has two threads started asking the same thing: https://community.appian.com/discussions/f/new-to-appian/24420/date