Get precise end date base on type of rent

Hello there

i just create a rent app,,

how to find the end date (date menu 2) based on Durasi sewa (rent duration), and Jenis Sewa (Rent Type)

Harian = day | Bulanan = Month | Tahunan = Year

Before this, i usually used this expressions :
 Start date30 days for Bulanan, and 360 days for tahunan.
actually, this enough for  now, but i want the end date  more specific because every month has different days

thanks

Screenshot 2023-05-19 142529.png

Solved Solved
0 3 198
1 ACCEPTED SOLUTION

Please try something like 

SWITCH( [Jenis Sewa], 

                "Bulanan",

                 EOMONTH( [Tanggal Mulai] , [Durasi Sewa] -1) + DAY([Tanggal Mulai]),

                  "Tahunan",

                   EOMONTH( [Tanggal Mulai] , ([Durasi Sewa]*12) -1) + DAY([Tanggal Mulai]),

                  "Harian",

                   [Tanggal Mulai] +[Durasi Sewa],

                    [Tanggal Mulai]

                   )

 

Please test well.

                   

                  

 

                

View solution in original post

3 REPLIES 3
Top Labels in this Space