Month End Date (UDF)
Month End Date (UDF)
Dear All,____I try to use UDF for finding month end date. but the problem is I cannot know the date format of each computer. I do as following but it work for some computer and don^t work in other computer.____M_End(d_in) // it works for computer use date format mm/dd/yyyy__========__Expression__------------__ctod( subs(dtoc(in+iif(day(in)>15,20,35),1) ,5,2)+^/01/^+subs(dtoc(in+iif(day(in)>15,20,35),1) ,1,4) ) -1 ____- How can I use one function with any date format? __- Have it got STOD( date char YYYYMMDD ) to Date ?____Thanks in advance,__Dutch
=> RE: Month End Date (UDF)
Try this UDF declaration and expression:____LMon(d_date)__adddays(date,monlen(date)-day(date))____When you pass it a date it returns the last day of the month for that date.____Kathleen__R&R Support
==> RE: Month End Date (UDF)
Thanks, it works great.__Dutch