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
Discussion posts and replies are publicly visible
can anyone answer for this?
your goal is a bit hard to understand. you try to call stored procedures from DB?
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?
how can I convert months to years?
Depending on your date format, you could use a combo of TIMESTAMPDIFF, YEAR, MONTH functions in MariaDB to them subtract, etc.
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) ?
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
© 2023 Appian. All rights reserved.