I'm trying to build a formula that shows the 1st d...
# suiteanalytics
n
I'm trying to build a formula that shows the 1st day of the 7th month from the Transaction Date. E.g. Today would be Oct 1st. Anyone have an example or a good site that helps out with these type of requests. Tried some research on PLSQL but got into a rabbit hole.
g
See if
ADD_MONTHS()
does the trick, and use
TRUNC()
to get it to the first of the month. https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions004.htm
TRUNC(ADD_MONTHS({trandate}, 7),'MONTH')
n
thats awesome @George McMullen! Thanks so much. I'll work at it and report back
Appreciate you taking the time to help @George McMullen
g
👍
n
So ours was a little more tricky as we needed to do it clientside. A teammember of mine figured it out after a lot of trial and error 🙂 Thanks for the running start @George McMullen Here it is for anyone searching in the future: nlapiDateToString(nlapiAddMonths((nlapiStringToDate((new Date().getMonth()+1) + '/' + '1' + '/' + new Date().getFullYear())),7))
g
Interesting! Glad to know you were able to get something working. Also, thanks for the tip about
nlapiAddMonths
- I’ll have to remember that one!