Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hai all, I try to make a flag for the last sunday of the month
=If(Date([DatFieldName], 'DD-MM-YYYY' )=Date(WeekEnd(MonthEnd(date#([DatFieldName],'DD-MM-YYYY'),)),'DD/MM/YYYY'),1,0) as FlagLastSunday => does not work
it works for WeekStart = but I need the sunday not the monday
=If(Date([Datum], 'DD-MM-YYYY' )=Date(WeekStart(MonthEnd(date#([Datum],'DD-MM-YYYY'),0)),'DD-MM-YYYY'),1)
Anyone?
Regards,
Ronald
May be this
If([DatFieldName] = Floor(WeekEnd(MonthEnd([DatFieldName])-6, 0, 0)), 1, 0) as FlagLastSunday;
May be this
If([DatFieldName] = Floor(WeekEnd(MonthEnd([DatFieldName])-6, 0, 0)), 1, 0) as FlagLastSunday;
The logic could be something like:
If(Day(MonthEnd(Date))-Day(Date)<=7 and Num(WeekDay(Date))=0, 1,0) as LastSUNFlag
Thanx Sunny!!!