Due date with EOMONTH

hello,
i have 2 fields
- billing date
- due date

i want to make auto due date next one month.
due date formula: EOMONTH([bill_date],0)+DAY([bill_date]).
This formula does not work properly when selecting the billing date from January 29 to January 31

duedate error.png

 

0 3 102
3 REPLIES 3


@dedmax wrote:

This formula does not work properly when selecting the billing date from January 29 to January 31


If you add more than 28 days to any of those dates, your expression will return a date in March since February has only 28 days.

It sounds like you want:

MIN(
EOMONTH([bill_date],0)+DAY([bill_date]),
EOMONTH([bill_date],1)
)

duedate error1.png

i try formula:

IF(OR(MOD(YEAR([tgl_tagihan]),400) = 0, AND(MOD(YEAR([tgl_tagihan]),4) = 0, MOD(YEAR([tgl_tagihan]),100) <> 0)),
IF(AND(MONTH([tgl_tagihan])=1,DAY([tgl_tagihan])>=29),
CONCATENATE("2/29/",YEAR([tgl_tagihan])),
EOMONTH([tgl_tagihan],0)+DAY([tgl_tagihan])),

IF(AND(MONTH([tgl_tagihan])=1,DAY([tgl_tagihan])>=29),
CONCATENATE("2/28/",YEAR([tgl_tagihan])),
EOMONTH([tgl_tagihan],0)+DAY([tgl_tagihan]))
)

Try (EOMONTH([tgl_tagihan], (0 + 1 - 1)) + DAY([tgl_tagihan]))

Top Labels in this Space