Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, good day everyone !
I want to get the number of months between 2 months. where
The expression I am using is
Month ([Expiry Date])-$(@calendarMonth) where Month([Expiry Date]) returns result like 'Aug' and $(@calendarMonth) returns result like 'July'.
Is it I need to convert the month string to number ?
Thanks sincerely for your help 🙂
Hi,
Try function NUM(). It look like NUM(Month ([Expiry Date]))
Regards,
Sokkorn
Hi,
Try function NUM(). It look like NUM(Month ([Expiry Date]))
Regards,
Sokkorn
Thanks Sokkorn Cheav, it works for the Expiry Date. How about the $(@calendarMonth) ?
I tried Num($(@calendarMonth)) but it does not return me 6 when I selected Jun.
Regards
Hi,
Can you give me the expression of this variable $(@calendarMonth)? Where you get it from? Or you can share your app.
Regards,
Sokkorn
The expression for variable @calendarMonth is =GetFieldSelections(PeriodMonth).
It is from a list box selection. For example, when user select 'Jun', I need to pass 6 into my expression
Month ([Expiry Date])-$(@calendarMonth). Thus, the result will be 8-6 =2
Hi,
Your variable expression =GetFieldSelections(PeriodMonth)
will return string value something like 'Jun'. So you need to convert it into number with this expression @calendarMonth = GetFieldSelections(Match(PeriodMonth, $(=chr(39) & Replace(MonthNames, ';', chr(39) & ',' & chr(39)) & chr(39))))
Test it and let me know the result.
Regards,
Sokkorn
hi ,
Sokkorn is right bt much easy way u can work is with following expression
date(date#(GetFieldSelections(PeriodMonth),'MMM'),'MM')
regards,
Vaibhav
Hi,
I have changed the expression of @calendarMonth to =GetFieldSelections(Match(PeriodMonth, $(=chr(39) & Replace(MonthNames, ';', chr(39) & ',' & chr(39)) & chr(39))
but variable $(@calendarMonth) returns nothing when the 'Jun' is selected in the listbox Calendar Month.
Regards,
Hi,
Is it possible to upload your app here?
Regards,
Sokkorn
hi
can u plz try
date(date#(GetFieldSelections(PeriodMonth),'MMM'),'MM')
n let me knw?